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