本文整理匯總了PHP中Zend_Controller_Front::removeControllerDirectory方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Controller_Front::removeControllerDirectory方法的具體用法?PHP Zend_Controller_Front::removeControllerDirectory怎麽用?PHP Zend_Controller_Front::removeControllerDirectory使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Controller_Front
的用法示例。
在下文中一共展示了Zend_Controller_Front::removeControllerDirectory方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _initApplication
/**
* 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);
}