本文整理汇总了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);
}
示例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');
}
示例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);
}
示例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);
}
示例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');
}
示例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');
}
示例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');
}
示例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');
}
示例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);
}
示例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');
}
示例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');
}
示例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');
}
示例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);
}
示例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');
}