Skip to content

Instantly share code, notes, and snippets.

@maxparm
Created January 22, 2011 00:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxparm/790714 to your computer and use it in GitHub Desktop.
Save maxparm/790714 to your computer and use it in GitHub Desktop.
/application/Bootstrap.php
<?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