Aspen:Config

From Aspen Documentation

Configuration Files

Aspen has three different configuration files, two of which you may use.

system/config.default.php
Defines configuration parameters used by the framework. These may be replaced by config values in the following two files. We do not recommend editing values directly in this file as it will be replaced by each upgrade.
app.default.config.php
Defines default configuration settings for your application. You may use this to set defaults for a multiple-install-location / redistributable application. Anything placed here may be overwritten by anything in the following file, and will override anything in the system configuration file. You may remove this file entirely as long as the items defined here are set in your config.php file.
config.php
A per-install or "user" configuration file. This allows per-use configurations to be set. Configurations here will override settings in the previous two files. This file does not exist by default, and must be created during installation.

Configuration settings may be created/edited using the following syntax:

$config['config_param_name_here'] = 'setting';

From within your application code you may access the configuration values by using:

$this->APP->config('config_param_name_here');

The config function will return your value or false if the index key is not set.

For a list of all framework configurations you may use, see our Configuration List.

Application Defaults

If you're developing an application or product that will have multiple deployments, you may wish to define your own custom default configurations that are separate from the user config file, as well as from the framework default config file.

You may define your custom configurations inside of the app.default.config.php file. These configuration values are loaded after the system default, and before the user config.

To prevent user config files from overriding any settings, just use PHP constants rather than indexes within the $config array.

The file itself is not required for the system to function, as long as the configuration values within the file are placed within the user config.