本文整理汇总了PHP中Routes::add方法的典型用法代码示例。如果您正苦于以下问题:PHP Routes::add方法的具体用法?PHP Routes::add怎么用?PHP Routes::add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Routes
的用法示例。
在下文中一共展示了Routes::add方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setRoutes
public static function setRoutes()
{
// URL Routes
Routes::add('/', 'apples', 'index');
Routes::add('/view/(:tofuID)/', 'apples', 'view');
Routes::add('/create/', 'apples', 'create');
Routes::add('/update/(:tofuID)/', 'apples', 'update');
Routes::add('/remove/(:tofuID)/', 'apples', 'remove');
}
示例2: array
* Language setting
*/
Lang::load('en');
/*
* Routing table setting: path to pages, js, css.
*/
/*
// More example about Routes:
Routes::add(array('home' => array( 'php' => array('pages/HomePage.php', 'pages/AboutPage.php' ),
'js' => array('graph' => 'js/dummy.js',),
'css' => array('graph' => 'js/dummy.css',),),
'login' => array( 'php' => 'pages/LoginPage.php',),
'error' => array( 'php' => 'pages/ErrorPage.php',),
));
*/
Routes::add(array('home' => array('php' => array('pages/HomePage.php')), 'intro' => array('php' => 'pages/IntroPage.php'), 'quickstart' => array('php' => 'pages/QuickstartPage.php'), 'feature' => array('php' => 'pages/FeaturePage.php'), 'license' => array('php' => 'pages/LicensePage.php'), 'download' => array('php' => 'pages/DownloadPage.php'), 'showcase' => array('php' => 'pages/ShowcasePage.php'), 'restrict' => array('php' => 'pages/RestrictPage.php'), 'login' => array('php' => 'pages/LoginPage.php'), 'error' => array('php' => 'pages/ErrorPage.php')));
/*
* Cache setting
*/
Configure::write(array('cache_enable' => false, 'do_not_cache' => array(), 'cache_time' => 21600), 'cache');
/*
* SEO setting
*/
Configure::write('jquery mobile, jquery mobile mvc, jquery mobile php, jquery mobile framework', 'app_keywords');
// meta keywords
Configure::write('A very lightweight PHP MVC framework utilizing jQuery Mobile', 'app_description');
// meta app description
Configure::write('http://tjm.tenkana.vn', 'baseurl');
// meta app canonical url
/*
* Authentication setting