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


PHP XenForo_Router::resolveActionWithIntegerParam方法代碼示例

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


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

示例1: match

 /**
  *
  * @see XenForo_Route_PrefixAdmin_AddOns::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $parts = explode('/', $routePath, 3);
     switch ($parts[0]) {
         case 'languages':
             $parts = array_slice($parts, 1);
             $routePath = implode('/', $parts);
             $action = $router->resolveActionWithIntegerParam($routePath, $request, 'language_id');
             return $router->getRouteMatch('XenForo_ControllerAdmin_Language', $action, 'languages');
         case 'phrases':
             $parts = array_slice($parts, 1);
             $routePath = implode('/', $parts);
             return $router->getRouteMatch('XenForo_ControllerAdmin_Phrase', $routePath, 'phrases');
     }
     if (count($parts) > 1) {
         switch ($parts[1]) {
             case 'languages':
                 $action = $router->resolveActionWithStringParam($routePath, $request, 'addon_id');
                 $parts = array_slice($parts, 2);
                 $routePath = implode('/', $parts);
                 $action = $router->resolveActionWithIntegerParam($routePath, $request, 'language_id');
                 return $router->getRouteMatch('XenForo_ControllerAdmin_Language', $action, 'languages');
             case 'phrases':
                 $action = $router->resolveActionWithStringParam($routePath, $request, 'addon_id');
                 $parts = array_slice($parts, 2);
                 $routePath = implode('/', $parts);
                 return $router->getRouteMatch('XenForo_ControllerAdmin_Phrase', $routePath, 'phrases');
         }
     }
     return parent::match($routePath, $request, $router);
 }
開發者ID:ThemeHouse-XF,項目名稱:Phrases,代碼行數:35,代碼來源:AddOns.php

示例2: 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)
 {
     if (preg_match('#^action/(.*)$#i', $routePath, $match)) {
         $action = 'action' . $router->resolveActionWithIntegerParam($match[1], $request, 'warning_action_id');
     } else {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, 'warning_definition_id');
     }
     return $router->getRouteMatch('XenForo_ControllerAdmin_Warning', $action, 'userWarnings');
 }
開發者ID:namgiangle90,項目名稱:tokyobaito,代碼行數:14,代碼來源:Warnings.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)
 {
     $parts = explode('/', $routePath, 2);
     $action = $parts[0];
     if (isset($parts[1])) {
         switch ($action) {
             case 'super':
                 $action .= $router->resolveActionWithIntegerParam($parts[1], $request, 'user_id');
                 break;
             case 'content':
                 $action .= $router->resolveActionWithIntegerParam($parts[1], $request, 'moderator_id');
                 break;
         }
     }
     return $router->getRouteMatch('XenForo_ControllerAdmin_Moderator', $action, 'moderators');
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:21,代碼來源:Moderators.php

示例4: match

 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithIntegerParam($routePath, $request, 'id');
     $routeMatch = $router->getRouteMatch('Dark_TaigaChat_ControllerPublic_TaigaChat', $action, 'taigachat', $routePath);
     //$routeMatch->setResponseType('jsonText');
     return $routeMatch;
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:7,代碼來源:TaigaChat.php

示例5: match

 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $components = explode('/', $routePath);
     $subPrefix = strtolower(array_shift($components));
     $controllerName = '';
     $action = '';
     $intParams = 'page_id';
     $strParams = '';
     $slice = false;
     switch ($subPrefix) {
         case 'special':
             if (!empty($components[1]) && ($components[0] == 'edit-template' || $components[0] == 'delete-template')) {
                 unset($components[1]);
             }
             $controllerName = '_Special';
             $slice = true;
             break;
         case 'archive':
             $controllerName = '_Archive';
             $intParams = 'history_id';
             $slice = true;
             break;
         default:
             $strParams = 'page_slug';
     }
     $routePathAction = implode('/', array_slice($slice ? $components : explode('/', $routePath), 0, 2)) . '/';
     $routePathAction = str_replace('//', '/', $routePathAction);
     if ($strParams) {
         $action = $router->resolveActionWithStringParam($routePathAction, $request, $strParams);
     } else {
         $action = $router->resolveActionWithIntegerParam($routePathAction, $request, $intParams);
     }
     $action = $router->resolveActionAsPageNumber($action, $request);
     return $router->getRouteMatch('EWRcarta_ControllerPublic_Wiki' . $controllerName, $action, 'wiki', $routePath);
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:35,代碼來源:Wiki.php

示例6: 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)
 {
     if (preg_match('#^auto/(.*)$#i', $routePath, $match)) {
         $action = 'auto' . $router->resolveActionWithIntegerParam($match[1], $request, 'auto_warning_id');
         return $router->getRouteMatch('XenForo_ControllerAdmin_Warning', $action, 'userWarnings');
     }
     return parent::match($routePath, $request, $router);
 }
開發者ID:ThemeHouse-XF,項目名稱:AutoWarning,代碼行數:13,代碼來源:Warnings.php

示例7: 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->getSubComponentAction($this->_subComponents, $routePath, $request, $controller);
     if ($action === false) {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, 'profile_post_id');
     }
     return $router->getRouteMatch('XenForo_ControllerPublic_ProfilePost', $action, 'members');
 }
開發者ID:darkearl,項目名稱:projectT122015,代碼行數:13,代碼來源:ProfilePosts.php

示例8: 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)
 {
     $controller = 'ThreePointStudio_CustomMarkupForUser_ControllerAdmin_CMFU';
     $action = $router->getSubComponentAction($this->_subComponents, $routePath, $request, $controller);
     if ($action === false) {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, 'preset_id');
     }
     return $router->getRouteMatch($controller, $action, 'users', '3ps-cmfu/');
 }
開發者ID:iversia,項目名稱:3ps_cmfu,代碼行數:14,代碼來源:CMFU.php

示例9: 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->resolveActionWithIntegerParam($routePath, $request, 'node_id');
     if (!class_exists('XFCP_ThemeHouse_SocialGroups_ControllerAdmin_SocialCategory', false)) {
         $createClass = XenForo_Application::resolveDynamicClass('XenForo_ControllerAdmin_Forum', 'controller');
         eval('class XFCP_ThemeHouse_SocialGroups_ControllerAdmin_SocialCategory extends ' . $createClass . ' {}');
     }
     return $router->getRouteMatch('ThemeHouse_SocialGroups_ControllerAdmin_SocialCategory', $action, 'nodeTree');
 }
開發者ID:AndroidOS,項目名稱:SocialGroups,代碼行數:14,代碼來源:SocialCategories.php

示例10: 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)
 {
     $controller = 'XenGallery_ControllerPublic_Redirects_XenMedio';
     $action = $router->getSubComponentAction($this->_subComponents, $routePath, $request, $controller);
     if ($action == false) {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, 'media_id');
     }
     return $router->getRouteMatch($controller, $action);
 }
開發者ID:VoDongMy,項目名稱:xenforo-laravel5.1,代碼行數:14,代碼來源:XenMedio.php

示例11: match

 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     if (in_array($routePath, array('add', 'save'))) {
         $action = $routePath;
     } else {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, 'log_id');
     }
     return $router->getRouteMatch('bdApi_ControllerAdmin_Log', $action, 'bdApi');
 }
開發者ID:billyprice1,項目名稱:bdApi,代碼行數:9,代碼來源:Log.php

示例12: match

 /**
  * @param $routePath
  * @param Zend_Controller_Request_Http $request
  * @param XenForo_Router $router
  * @return false|XenForo_RouteMatch
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $controller = 'sonnb_XenGallery_ControllerAdmin_XenGallery';
     $action = $router->getSubComponentAction($this->_subComponents, $routePath, $request, $controller);
     if ($action === false) {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, '');
     }
     return $router->getRouteMatch($controller, $action, 'sonnb_xengallery');
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:15,代碼來源:XenGallery.php

示例13: match

 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithIntegerParam($routePath, $request, 'tag_id');
     $majorSection = 'Tinhte_XenTag_Tag';
     if (empty($action) or strtolower($action) == 'index') {
         $majorSection = 'threadsPosts';
     }
     return $router->getRouteMatch('Tinhte_XenTag_ControllerAdmin_Tag', $action, $majorSection);
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:9,代碼來源:Tag.php

示例14: 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)
 {
     $controller = 'XenResource_ControllerPublic_Resource';
     $action = $router->getSubComponentAction($this->_subComponents, $routePath, $request, $controller);
     if ($action === false) {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, 'resource_id');
     }
     return $router->getRouteMatch($controller, $action, 'resources');
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:14,代碼來源:Resources.php

示例15: match

 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $subcomponents = $this->_getSubcomponents();
     $defaultController = $subcomponents['categories']['controller'];
     $action = $router->getSubComponentAction($subcomponents, $routePath, $request, $defaultController);
     if ($action === false) {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, 'portalItem_id');
     }
     return $router->getRouteMatch($defaultController, $action, 'portal');
 }
開發者ID:NixFifty,項目名稱:XenForo-SimplePortal,代碼行數:10,代碼來源:Lpmanage.php


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