Created
January 22, 2011 00:36
-
-
Save maxparm/790714 to your computer and use it in GitHub Desktop.
/application/Bootstrap.php
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
<?php | |
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap | |
{ | |
protected function _initConfig() { | |
//path of configuration file | |
$path = APPLICATION_PATH.'/configs/application.ini'; | |
//Get the configuration data | |
$config = new Zend_Config_Ini($path); | |
//Filter by data by environement value (production, staging, testing, development) | |
$config = $config->get(APPLICATION_ENV); | |
//Store data in the registry to access it everywhere | |
Zend_Registry::set('config', $config); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment