本文整理汇总了PHP中Zend_Controller_Front::setDefaultModule方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Controller_Front::setDefaultModule方法的具体用法?PHP Zend_Controller_Front::setDefaultModule怎么用?PHP Zend_Controller_Front::setDefaultModule使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Controller_Front
的用法示例。
在下文中一共展示了Zend_Controller_Front::setDefaultModule方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: initPlugins
/**
* Initialize plugins
*
* @return void
*/
public function initPlugins()
{
$this->_front->setDefaultModule('default');
}
示例3: initControllerFront
/**
* @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);
}