/** * init application * @return void */ protected function _initApplication() { Zend_Session::setOptions(array('name' => $this->settings->page->session->name, 'save_path' => realpath(APPLICATION_PATH . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'sessions'))); Zend_Session::start(); // sollte wenn name feststeht ge�ndert werden # get an instance of the frontend controller $this->bootstrap('FrontController'); $this->frontController = Zend_Controller_Front::getInstance(); # now add our own dispatcher $this->frontController->setDispatcher(new FansubCMS_Controller_Dispatcher_Standard()); # prefix default module as well $this->frontController->setParam('prefixDefaultModule', true); # set default and module controller directrories // $this->frontController->setControllerDirectory($this->settings->controllers->toArray()); $this->frontController->addModuleDirectory(APPLICATION_PATH . "/modules"); $this->frontController->removeControllerDirectory('default'); # set default module $this->frontController->setDefaultModule("news"); # Init application-wide Session $applicationSessionNamespace = new Zend_Session_Namespace('application'); $applicationSessionNamespace->tstamp = !isset($applicationSessionNamespace->tstamp) ? time() : $applicationSessionNamespace->tstamp; # add it to the registry Zend_Registry::set('applicationSessionNamespace', $applicationSessionNamespace); # Init authentication Session $authSessionNamespace = new Zend_Session_Namespace('Zend_Auth'); # add it to the registry Zend_Registry::set('AuthSessionNamespace', $authSessionNamespace); # set timezone date_default_timezone_set(empty($this->settings->page->timezone) ? 'Europe/Berlin' : $this->settings->page->timezone); # hook to settings $this->settings->applicationStatus = $this->applicationStatus; # hook needed objects/values to the zend registry Zend_Registry::set('settings', $this->settings); Zend_Registry::set('applicationStatus', $this->applicationStatus); Zend_Registry::set('environmentSettings', $this->environmentsettings); Zend_Registry::set('emailSettings', $this->mailsettings); }
/** * Initialize plugins * * @return void */ public function initPlugins() { $this->_front->setDefaultModule('default'); }
/** * @static * @param \Zend_Controller_Front $front */ public static function initControllerFront(\Zend_Controller_Front $front) { // disable build-in error handler $front->setParam('noErrorHandler', true); // for admin an other modules directly in the core $front->addModuleDirectory(PIMCORE_PATH . "/modules"); // for plugins if (is_dir(PIMCORE_PLUGINS_PATH) && is_readable(PIMCORE_PLUGINS_PATH)) { $front->addModuleDirectory(PIMCORE_PLUGINS_PATH); } // for frontend (default: website) $front->addControllerDirectory(PIMCORE_WEBSITE_PATH . "/controllers", PIMCORE_FRONTEND_MODULE); $front->setDefaultModule(PIMCORE_FRONTEND_MODULE); }