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