Created
December 1, 2011 21:30
-
-
Save isaiahdw/1420019 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Attach a file reader to config. Multiple readers are supported. | |
*/ | |
Kohana::$config = new Config; | |
Kohana::$config->attach(new Config_File); | |
/** | |
* Attach the environment specific configuration file reader to config if not in production. | |
*/ | |
if (Kohana::$environment != Kohana::PRODUCTION) | |
{ | |
Kohana::$config->attach(new Config_File('config/environments/'.$env)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thx, I'm currently using... Kohana::$config->attach(new Config_File('config/environments/' . arr::get(array('production', 'staging', 'testing', 'development'), Kohana::$environment - 1)));