/** * * @return Zend_Application */ public static function getApplication() { $application = new Zend_Application(APPLICATION_ENV); $applicationini = new Zend_Config_Ini(APPLICATION_PATH . "/configs/application.ini", APPLICATION_ENV); $options = $applicationini->toArray(); foreach (self::$_ini as $value) { $iniFile = APPLICATION_PATH . self::$_pathConfig . $value; if (is_readable($iniFile)) { $config = new Zend_Config_Ini($iniFile); $options = $application->mergeOptions($options, $config->toArray()); } else { throw new Zend_Exception('error en la configuracion de los .ini'); } } // foreach (self::$_ini as $value) { // $iniFile = APPLICATION_PATH . self::$_pathConfig . $value; // // if (is_readable($iniFile)) { // $config = new Zend_Config_Ini($iniFile); // $options = $application->mergeOptions($options, // $config->toArray()); // } else { // throw new Zend_Exception('error en la configuracion de los .ini'); // } // } Zend_Registry::set('config', $options); $a = $application->setOptions($options); return $application; }