當前位置: 首頁>>代碼示例>>PHP>>正文


PHP XenForo_Router::addRule方法代碼示例

本文整理匯總了PHP中XenForo_Router::addRule方法的典型用法代碼示例。如果您正苦於以下問題:PHP XenForo_Router::addRule方法的具體用法?PHP XenForo_Router::addRule怎麽用?PHP XenForo_Router::addRule使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在XenForo_Router的用法示例。


在下文中一共展示了XenForo_Router::addRule方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: route

 /**
  * Routes the request.
  *
  * @see XenForo_Dependencies_Abstract::route()
  */
 public function route(Zend_Controller_Request_Http $request)
 {
     $router = new XenForo_Router();
     $router->addRule(new XenForo_Route_ResponseSuffix(), 'ResponseSuffix')->addRule(new XenForo_Route_Prefix('admin'), 'PrefixAdmin');
     return $router->match($request);
 }
開發者ID:hahuunguyen,項目名稱:DTUI_201105,代碼行數:11,代碼來源:Admin.php

示例2: init_router_public

 public static function init_router_public(XenForo_Dependencies_Abstract $dependencies, XenForo_Router $router)
 {
     $rules = $router->getRules();
     $router->resetRules();
     // insert our filter as the first rule
     $router->addRule(new WidgetFramework_Route_Filter_PageX(), 'WidgetFramework_Route_Filter_PageX');
     foreach ($rules as $ruleName => $rule) {
         $router->addRule($rule, $ruleName);
     }
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:10,代碼來源:Listener.php

示例3: getRouter

 /**
  * @return XenForo_Router
  */
 public function getRouter()
 {
     $router = new XenForo_Router();
     $router->addRule(new XenForo_Route_ResponseSuffix(), 'ResponseSuffix')->addRule(new XenForo_Route_Prefix('admin'), 'PrefixAdmin');
     return $router;
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:9,代碼來源:Admin.php

示例4: getRouter

 /**
  * @return XenForo_Router
  */
 public function getRouter()
 {
     $router = new XenForo_Router();
     $router->addRule(new XenForo_Route_ResponseSuffix(), 'ResponseSuffix')->addRule(new XenForo_Install_Route(), 'Install');
     return $router;
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:9,代碼來源:Install.php

示例5: getRouter

 /**
  * @return XenForo_Router
  */
 public function getRouter()
 {
     $router = new XenForo_Router();
     $router->addRule(new XenForo_Route_Filter(), 'Filter')->addRule(new XenForo_Route_ResponseSuffix(), 'ResponseSuffix')->addRule(new XenForo_Route_Prefix('public'), 'Prefix');
     XenForo_CodeEvent::fire('init_router_public', array($this, $router));
     return $router;
 }
開發者ID:darkearl,項目名稱:projectT122015,代碼行數:10,代碼來源:Public.php

示例6: route

 /**
  * Routes the request.
  *
  * @see XenForo_Dependencies_Abstract::route()
  */
 public function route(Zend_Controller_Request_Http $request)
 {
     $router = new XenForo_Router();
     $router->addRule(new XenForo_Route_ResponseSuffix(), 'ResponseSuffix')->addRule(new XenForo_Install_Route(), 'Install');
     return $router->match($request);
 }
開發者ID:hahuunguyen,項目名稱:DTUI_201105,代碼行數:11,代碼來源:Install.php

示例7: initRouterPublic

 public static function initRouterPublic(XenForo_Dependencies_Abstract $dependencies, XenForo_Router $router)
 {
     $router->addRule(new ThemeHouse_ShorterRoutes_Route_ShorterRoute('public'), 'ShorterRoute');
 }
開發者ID:ThemeHouse-XF,項目名稱:ShorterRoutes,代碼行數:4,代碼來源:InitRouterPublic.php

示例8: init_router_public

 public static function init_router_public(XenForo_Dependencies_Abstract $dependencies, XenForo_Router $router)
 {
     if (WidgetFramework_Option::get('indexNodeId') > 0) {
         // one of our widget pages was selected as the index page
         // modify the router rules to serve http://domain.com/xenforo/page-x urls
         $rules = $router->getRules();
         $router->resetRules();
         // insert our filter as the first rule
         $router->addRule(new WidgetFramework_Route_Filter_PageX(), 'WidgetFramework_Route_Filter_PageX');
         foreach ($rules as $ruleName => $rule) {
             $router->addRule($rule, $ruleName);
         }
     }
 }
開發者ID:maitandat1507,項目名稱:bdWidgetFramework,代碼行數:14,代碼來源:Listener.php


注:本文中的XenForo_Router::addRule方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。