本文整理汇总了PHP中Website::settings方法的典型用法代码示例。如果您正苦于以下问题:PHP Website::settings方法的具体用法?PHP Website::settings怎么用?PHP Website::settings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Website
的用法示例。
在下文中一共展示了Website::settings方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: implode
<?php
/**
* Configure and create a website object
*/
// set the settings in website class
Website::settings(Kohana::$config->load('websites'));
// get a website instance
$website = Website::instance();
// create website regex pattern
$websites_pattern = '(' . implode('|', $website->websites()) . ')';
// set the website regex in the website instance
$website->match('(website_' . $websites_pattern . ')', 1);
/**
* BACKEND
*/
Route::set('backend', 'admin(/website_<website>)(/viewport_<viewport>(/task_<task>)(/callback_<callback>))(/<controller>(/arguments_<arguments>)(/<action>(/<id>(/<param1>(/<param2>(/<param3>))))))(?<query>)', array('website' => $websites_pattern, 'viewport' => '(application|module|item)', 'task' => '(select)'))->defaults(array('controller' => 'Default', 'action' => 'index'))->retain(array('website', 'viewport', 'task', 'callback', 'arguments'));
/**
* ERROR
*/
Route::set('error', 'error(/<action>(/<message>))', array('action' => '[0-9]++', 'message' => '.+'))->defaults(array('controller' => 'Error', 'action' => '500', 'message' => ''));
/**
* DIRECT ACCESS
*/
Route::set('access', 'access/<token>(/<controller>(/<action>(/<id>(/<param1>))))')->defaults(array('token' => '', 'controller' => 'Home', 'action' => 'index'));
/**
* INTERNAL SUBREQUEST
*/
Route::set('internal', 'internal_<controller>(@<action>(:<id>))', array('controller' => '[a-zA-Z0-9\\_\\-]+', 'action' => '[a-zA-Z0-9\\_\\-]+'))->defaults(array('action' => 'index'));
/**
* LOCAL ALIAS NEWS
开发者ID:yubinchen18,项目名称:A-basic-website-project-for-a-company-using-the-MVC-pattern-in-Kohana-framework,代码行数:31,代码来源:routes.php