本文整理匯總了PHP中Axis_Locale::getLocaleList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Axis_Locale::getLocaleList方法的具體用法?PHP Axis_Locale::getLocaleList怎麽用?PHP Axis_Locale::getLocaleList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Axis_Locale
的用法示例。
在下文中一共展示了Axis_Locale::getLocaleList方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _initRouter
protected function _initRouter()
{
$this->bootstrap('FrontController');
$router = new Axis_Controller_Router_Rewrite();
// pre router config
$defaultLocale = Axis_Locale::getDefaultLocale();
$locales = Axis_Locale::getLocaleList(true);
Axis_Controller_Router_Route_Front::setDefaultLocale($defaultLocale);
Axis_Controller_Router_Route_Front::setLocales($locales);
// include routes files
$routeFiles = Axis::app()->getRoutes();
foreach ($routeFiles as $routeFile) {
if (!is_readable($routeFile)) {
continue;
}
include_once $routeFile;
}
$router->removeDefaultRoutes();
if (!$router instanceof Axis_Controller_Router_Rewrite) {
throw new Axis_Exception('Incorrect routes');
}
$front = $this->getResource('FrontController');
$front->setRouter($router);
$sslRedirectorActionHelper = new Axis_Controller_Action_Helper_SecureRedirector();
Zend_Controller_Action_HelperBroker::addHelper($sslRedirectorActionHelper);
return $router;
}