Config (configuration) of Brain is handled through the Config class. Use it through the container, or use it via the static Config class. Either way, keys and corresponding values put in $cfg are available to you throughout the application.
Brain will normally look for config files in both the system and application directories, always looking for a /config/ directory. System config files are loaded first, and if another config file with the same name is loaded, it’s $cfg will extend the system $cfg.
Dot Notation
The config class can set and retrieve config items with a dot notation. You are welcome to use a stardard array, but dot notation reduces typing. There is no limit to the depth of the config array.
/** * Basic usage (without dot notation) */ // Config item set in file $cfg['foo'] = 'bar'; // Set it dynamically from the app Config::set_item('foo','bar'); /*OR*/ $this->container['config']->set_item('foo','bar'); // Retrieve it from the app $val = Config::item('foo'); /*OR*/ $val = $this->container['config']->item('foo'); // ------------------------------------- /** * Dot notation usage */ // Config item set in file $cfg['foo']['bar'] = 'baz'; // Set it dynamically from the app Config::set_item('foo.bar','baz'); /*OR*/ $this->container['config']->set_item('foo.bar','baz'); // Retrieve it from the app $val = Config::item('foo.bar'); /*OR*/ $val = $this->container['config']->item('foo.bar'); // -------------------------------------