当前位置: 首页>>代码示例>>PHP>>正文


PHP XenForo_Router::resolveActionAsPageNumber方法代码示例

本文整理汇总了PHP中XenForo_Router::resolveActionAsPageNumber方法的典型用法代码示例。如果您正苦于以下问题:PHP XenForo_Router::resolveActionAsPageNumber方法的具体用法?PHP XenForo_Router::resolveActionAsPageNumber怎么用?PHP XenForo_Router::resolveActionAsPageNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XenForo_Router的用法示例。


在下文中一共展示了XenForo_Router::resolveActionAsPageNumber方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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

示例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)
 {
     $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

示例3: match

 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $components = explode('/', $routePath);
     $subPrefix = strtolower(array_shift($components));
     $subSplits = explode('.', $subPrefix);
     $controllerName = '';
     $action = '';
     $intParams = 'event_id';
     $strParams = '';
     $slice = false;
     switch ($subPrefix) {
         case 'monthly':
             $controllerName = '_Monthly';
             $strParams = 'date_select';
             $slice = true;
             break;
         case 'weekly':
             $controllerName = '_Weekly';
             $strParams = 'date_select';
             $slice = true;
             break;
         case 'daily':
             $controllerName = '_Daily';
             $strParams = 'date_select';
             $slice = true;
             break;
         case 'birthdays':
             $controllerName = '_Birthdays';
             $strParams = 'date_select';
             $slice = true;
             break;
         default:
             if (is_numeric(end($subSplits))) {
                 $controllerName = '_Event';
             }
     }
     $routePathAction = ($slice ? implode('/', array_slice($components, 0, 2)) : $routePath) . '/';
     $routePathAction = str_replace('//', '/', $routePathAction);
     $routePathAction = preg_replace('#create/\\d+#i', 'create/', $routePathAction);
     if ($strParams) {
         $action = $router->resolveActionWithStringParam($routePathAction, $request, $strParams);
     } elseif ($intParams) {
         $action = $router->resolveActionWithIntegerParam($routePathAction, $request, $intParams);
     }
     $action = $router->resolveActionAsPageNumber($action, $request);
     return $router->getRouteMatch('EWRatendo_ControllerPublic_Events' . $controllerName, $action, 'events', $routePath);
 }
开发者ID:Sywooch,项目名称:forums,代码行数:47,代码来源:Events.php

示例4: 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

示例5: 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, 'location_id');
     $action = $router->resolveActionAsPageNumber($action, $request);
     return $router->getRouteMatch('ThemeHouse_ResCheckInOut_ControllerAdmin_Location', $action, 'checkInOutLocations');
 }
开发者ID:ThemeHouse-XF,项目名称:ResCheckInOut,代码行数:11,代码来源:CheckInOutLocations.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)
 {
     $action = $router->resolveActionWithIntegerOrStringParam($routePath, $request, 'node_id', 'node_name');
     $action = $router->resolveActionAsPageNumber($action, $request);
     return $router->getRouteMatch('ThemeHouse_SocialGroups_ControllerPublic_SocialCategory', $action, 'forums');
 }
开发者ID:AndroidOS,项目名称:SocialGroups,代码行数:11,代码来源:SocialCategories.php

示例7: match

 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithIntegerParam($routePath, $request, 'id');
     $action = $router->resolveActionAsPageNumber($action, $request);
     return $router->getRouteMatch('sonnbUpThread_ControllerAdmin_UpThread', $action, 'sonnbUpThread_logNav');
 }
开发者ID:darkearl,项目名称:projectT122015,代码行数:6,代码来源:UpThread.php

示例8: match

 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithStringParam($routePath, $request, 'category_slug');
     $action = $router->resolveActionAsPageNumber($action, $request);
     return $router->getRouteMatch('EWRporta_ControllerPublic_Articles', 'index', 'portal');
 }
开发者ID:Sywooch,项目名称:forums,代码行数:6,代码来源:Articles.php

示例9: match

 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $components = explode('/', $routePath);
     $subPrefix = strtolower(array_shift($components));
     $subSplits = explode('.', $subPrefix);
     $controllerName = '';
     $action = '';
     $intParams = 'media_id';
     $strParams = '';
     $slice = false;
     switch ($subPrefix) {
         case 'comment':
             $controllerName = '_Comment';
             $intParams = 'comment_id';
             $slice = true;
             break;
         case 'playlist':
             $controllerName = '_Playlist';
             $intParams = 'playlist_id';
             $slice = true;
             break;
         case 'category':
             $controllerName = '_Category';
             $intParams = 'category_id';
             $slice = true;
             break;
         case 'user':
             $controllerName = '_User';
             $intParams = 'user_id';
             $slice = true;
             break;
         case 'keyword':
             $controllerName = '_Keyword';
             $strParams = 'keyword_text';
             $slice = true;
             break;
         case 'service':
             $controllerName = '_Service';
             $strParams = 'service_slug';
             $slice = true;
             break;
         case 'admin':
             $controllerName = '_Admin';
             $slice = true;
             break;
         default:
             if (is_numeric(end($subSplits))) {
                 $controllerName = '_Media';
             }
     }
     if (!empty($components[1]) && is_numeric($components[1])) {
         unset($components[1]);
     }
     $routePathAction = $slice ? implode('/', array_slice($components, 0, 2)) : $routePath;
     if ($strParams) {
         $action = $router->resolveActionWithStringParam($routePathAction, $request, $strParams);
     } else {
         $action = $router->resolveActionWithIntegerParam($routePathAction, $request, $intParams);
     }
     $action = $router->resolveActionAsPageNumber($action, $request);
     $action = (int) $action > 0 ? '' : $action;
     return $router->getRouteMatch('EWRmedio_ControllerPublic_Media' . $controllerName, $action, 'media', $routePath);
 }
开发者ID:Sywooch,项目名称:forums,代码行数:63,代码来源:Media.php

示例10: 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('WidgetFramework_ControllerPublic_WidgetPage', $action, 'forums');
 }
开发者ID:maitandat1507,项目名称:bdWidgetFramework,代码行数:6,代码来源:WidgetPages.php

示例11: 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->resolveActionWithStringParam($routePath, $request, 'handler_type_id');
     $action = $router->resolveActionAsPageNumber($action, $request);
     return $router->getRouteMatch('ThemeHouse_Objects_ControllerAdmin_HandlerType', $action, 'applications');
 }
开发者ID:ThemeHouse-XF,项目名称:Objects,代码行数:11,代码来源:HandlerTypes.php

示例12: match

 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithStringParam($routePath, $request, 'layout_id');
     $action = $router->resolveActionAsPageNumber($action, $request);
     return $router->getRouteMatch('EWRporta_ControllerPublic_Portal', $action, 'portal');
 }
开发者ID:Sywooch,项目名称:forums,代码行数:6,代码来源:Portal.php

示例13: 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->resolveActionWithStringParam($routePath, $request, 'tag_url');
     $action = $router->resolveActionAsPageNumber($action, $request);
     return $router->getRouteMatch('XenForo_ControllerPublic_Tag', $action);
 }
开发者ID:darkearl,项目名称:projectT122015,代码行数:11,代码来源:Tags.php

示例14: match

 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionAsPageNumber($routePath, $request);
     return $router->getRouteMatch('WidgetFramework_ControllerPublic_WidgetPage', 'as-index');
 }
开发者ID:Sywooch,项目名称:forums,代码行数:5,代码来源:WidgetPageIndex.php


注:本文中的XenForo_Router::resolveActionAsPageNumber方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。