/* @var $cnf Zend_Config_Ini */ $cnf = Zend_Registry::get('config'); Zend_Layout::startMvc()->setLayoutPath(APP_BASE . "/{$cnf->layout->dir}")->setLayout($cnf->layout->script); } protected function initRoutes(Zend_Controller_Request_Abstract $req) { } protected function initController() { $fc = Zend_Controller_Front::getInstance(); $fc->addModuleDirectory(APP_BASE . '/modules'); } public function routeStartup($req) { $this->initMVC(); $this->initDB(); $this->initRoutes($req); } public function __construct() { $this->initConfig(); $this->initController(); } } try { Initializer::setupIncPath(); Zend_Controller_Front::getInstance()->registerPlugin(new Initializer())->dispatch(); } catch (Exception $ex) { echo "An unhandled Exception was caught: <b>" . $ex->getMessage() . "</b>"; echo "<pre>" . $ex->getTraceAsString() . "</pre>"; }