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


PHP XenForo_Router::resolveActionWithIntegerOrStringParam方法代碼示例

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


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

示例1: match

 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithIntegerOrStringParam($routePath, $request, 'social_forum_id', 'url_portion');
     $action = $router->resolveActionAsPageNumber($action, $request);
     if (!class_exists('XFCP_ThemeHouse_SocialGroups_ControllerPublic_SocialForum', false)) {
         $createClass = XenForo_Application::resolveDynamicClass('XenForo_ControllerPublic_Forum', 'controller');
         eval('class XFCP_ThemeHouse_SocialGroups_ControllerPublic_SocialForum extends ' . $createClass . ' {}');
     }
     return $router->getRouteMatch('ThemeHouse_SocialGroups_ControllerPublic_SocialForum', $action, 'forums');
 }
開發者ID:AndroidOS,項目名稱:SocialGroups,代碼行數:15,代碼來源:SocialForums.php

示例2: match

 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $controller = 'Nobita_Teams_ControllerPublic_Team';
     $action = $router->getSubComponentAction($this->_subComponents, $routePath, $request, $controller);
     if ($action === false) {
         $parts = explode('/', $routePath);
         $customUrl = reset($parts);
         $customUrl = str_replace('-', '', $customUrl);
         $customUrl = strtolower($customUrl);
         if (in_array($customUrl, Nobita_Teams_Blacklist::$blacklist)) {
             // sytem action filter out
             $action = $router->resolveActionWithIntegerParam($routePath, $request, 'team_id');
         } else {
             $action = $router->resolveActionWithIntegerOrStringParam($routePath, $request, 'team_id', 'custom_url');
         }
         $action = $router->resolveActionAsPageNumber($action, $request);
     }
     return $router->getRouteMatch($controller, $action, TEAM_ROUTE_ACTION);
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:19,代碼來源:Teams.php

示例3: match

 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithIntegerOrStringParam($routePath, $request, 'node_id', 'node_name');
     $action = $router->resolveActionAsPageNumber($action, $request);
     return $router->getRouteMatch('XenForo_ControllerPublic_Forum', $action, 'forums');
 }
開發者ID:namgiangle90,項目名稱:tokyobaito,代碼行數:11,代碼來源:Forums.php


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