zend configuration

zend validation

 protected function _initDatabase() {
        // get config from config/application.ini
        $config = $this->getOptions();

        $db = Zend_Db::factory($config['resources']['db']['adapter'], $config['resources']['db']['params']);

        //set default adapter
        Zend_Db_Table::setDefaultAdapter($db);

        //save Db in registry for later use
        Zend_Registry::set("db", $db);
    }

	protected function _initBaseclass() {
        // get config from config/application.ini
        require_once APPLICATION_PATH . '/modules/admin/controllers/AppadminController.php';
    }
    
 
    protected function _initConfig()
	{
   	   $config = new Zend_Config_Ini(APPLICATION_PATH.'/configs/errormsg.ini');
			Zend_Registry::set('config',$config);
			
			$this->bootstrap('view');
         $view = $this->getResource('view');
         $view->errMsg = $config->toArray();
 	}

Usage

application/bootstrap.php


Comments

Add your comment

Need a COVID-19 website?
Preview
Or
Contact us

No, thanks!