Configuration
Configuration is all native PHP code using array syntax. The configuration array is returned at the bottom of the main configuration file so it can be correctly scoped and stored in a variable.
Shortened example configuration file:
File: app/config/app.php
Config Overrides by Hostname
In Alloy, it is possible to provide configuration overrides for different envirornments by hostname.
The main config file is found here:
app/config/app.php
This file can be overridden by a custom hostname-based configuration:
app/config/
The hostname is determined by a php_uname('n') call in the bootstrap file.
Retrieving Config Values (Getter)
Configuration values can be retrieved directly from the Kernel by calling the config method. Nested configuration values as resolved using a dot syntax.
If you are unsure if a config value will be present, you can supply a default as the second parameter.
Setting Config Values (Setter)
The same config method can be used to set config values if the first parameter passed is an array. If the config keys passed in the array are already present, they will be overwritten with the new values passed in.