Gets the action from the AltoRouter match.
@param  array $match An AltoRouter answer
@return string
331786
private function getActionFromMatch($match = array())
    {
        $target = explode("#", $match["target"]);

        if (count($target) > 1) {
            return $target[1];
        }

        if (array_key_exists("action", $match["params"])) {
            return $this->getActionFromParam($match["params"]["action"]);
        }

        $this->controller->request = new Request();
        if (is_admin() && $this->controller->request->hasGet('page')) {
            return $this->controller->request->get('page');
            // When no method is sent, guesstimate from the action post value (ex: basic ajax)
        } elseif ($this->controller->request->hasPost('action')) {
            return $this->controller->request->post('action');
        }
    }
234967
protected function _doAutoLinks_url_callback($matches) {
		$url = $this->encodeURLAttribute($matches[1], $text);
		$link = "<a href=\"$url\">$text</a>";
		return $this->hashPart($link);
	}
1337278
public function matchAction($matchAction = null)
    {
        if ($matchAction === null) {
            return $this->_matchAction;
        }
        $this->_matchAction = $matchAction;

        return $this;
    }
1047890
public static function get($request, $match)
    {
        $perm = Pluf_Shortcuts_GetObjectOr404('User_Role', $match['role_id']);
        $groupModel = new User_Group();
        $param = array(
            'view' => 'join_role',
            'filter' => array(
                'id=' . $match['group_id'],
                'role_id=' . $perm->id
            )
        );
        $groups = $groupModel->getList($param);
        if ($groups->count() == 0) {
            throw new Pluf_Exception_DoesNotExist('Group has not such role');
        }
        return $groups[0];
    }
1321843
private function getArgumentsFromDynamicMatch($match = array())
    {
        if (array_key_exists("params", $match["params"])) {
            $params = $match["params"]["params"];
            return is_array($params) ? $params : array($params);
        }

        return array();
    }
888977
protected function _routeMatch($matches)
    {
        if (isset($this->_tmpMatches[$matches[1]])) {
            return $this->_tmpMatches[$matches[1]];
        }
        if (isset($this->_tmpDefault[$this->_tmpKey])) {
            return $this->_tmpDefault[$this->_tmpKey];
        }
        throw new \Mmi\Mvc\MvcException('Router failed due to invalid route definition - no default param for key: ' . $this->_tmpKey);
    }
629214
public static function find($request, $match)
    {
        $pag = new Pluf_Paginator(new User_Role());
        $pag->list_filters = array(
            'name',
            'code_name',
            'application'
        );
        $search_fields = array(
            'name',
            'code_name',
            'description',
            'application'
        );
        $sort_fields = array(
            'id',
            'name',
            'code_name',
            'application',
            'description'
        );
        $pag->forced_where = new Pluf_SQL('user_group_id=%s', array(
            $match['group_id']
        ));
        $pag->configure(array(), $search_fields, $sort_fields);
        $pag->setFromRequest($request);
        $pag->model_view = 'join_group';
        return $pag->render_object();
    }
841413
public function getAction() {
		if ($this->action) {
			return $this->action;
		} else {
			$action = "index";
			switch ($_SERVER['REQUEST_METHOD']) {
				case "GET":
					if (count($this->getFilterParameters()) == 0) {
						$action = "index";
					} else {
						$action = "get";
					}
					break;
				case "POST":
					$action = "post";
					break;
				case "PUT":
					$action = "put";
					break;
				case "DELETE":
					$action = "delete";
					break;
				case "HEAD":
					$action = "head";
					break;
				case "SEARCH":
					$action = "search";
					break;
				case "OPTIONS":
					$action = "options";
					break;
			}

			return $action;
		}
	}
16961
private static function _escapeStringCallback(array $match): string
    {
        if (isset($match[2])) {
            return self::ESCAPE_SPECIALS[$match[2]]
                ?? \sprintf('\\x%02X', \ord($match[2]));
        }
        return '\\' . $match[1];
    }
859564
public function action($removeHttpMethod = true)
    {
        if ($action = $this->router->currentRouteAction()) {
            $action = last(Str::parseCallback($action, null));

            if ($removeHttpMethod) {
                $action = str_replace(['get', 'post', 'patch', 'put', 'delete'], '', $action);
            }

            return Str::snake($action, '-');
        }

        return null;
    }
349847
public function get($match = [], $except = [])
    {
        return $this->routes->filterMatch($match)
            ->filterExcept($except)
            ->values();
    }
1307481
protected function matchRequest(array $match, Request $request) : bool
    {
        if (!$request->is(trim($match['path'], '/'))) {
            return false;
        }

        $method = collect($match['method'])->filter()->map(function ($method) {
            return strtoupper($method);
        });

        return $method->isEmpty() || $method->contains($request->method());
    }
41078
protected function compileStatement(array $match)
    {
        if (strpos($match[1], '@') !== false) {
            $match[0] = isset($match[3]) ? $match[1] . $match[3] : $match[1];
        } elseif (isset($this->directives[$match[1]])) {
            $match[0] = call_user_func($this->directives[$match[1]], isset($match[3]) ? $match[3] : null);
        } elseif (method_exists($this, $method = 'compile' . ucfirst($match[1]))) {
            $match[0] = $this->$method(isset($match[3]) ? $match[3] : null);
        }

        return isset($match[3]) ? $match[0] : $match[0] . $match[2];
    }
1316295
private function resolveTag($match)
    {
        $tagReflector = $this->createLinkOrSeeTagFromRegexMatch($match);
        if (!$tagReflector instanceof Tag\SeeTag && !$tagReflector instanceof Tag\LinkTag) {
            return $match;
        }

        $link        = $this->getLinkText($tagReflector);
        $description = $tagReflector->getDescription();

        if ($this->isUrl($link)) {
            return $this->generateMarkdownLink($link, $description ?: $link);
        }

        $link    = $this->resolveQsen($link);
        $element = $this->findElement($link);
        if (!$element) {
            return $link;
        }

        return $this->resolveElement($element, $link, $description);
    }
1113425
public function action($action, $parameters = [], array $query = [])
    {
        $callback = function (Route $route) use ($action) {

            return $route->getActionName() === $action && $route->acceptedVerb('GET');
        };

        $route = $this->getRouteCollection()->firstOrFail($callback);

        return $this->to($route->toUri((array) $parameters), $query);
    }
284920
private function orElseMatch(Match $match)
    {
        return array_key_exists($this->subject->getName(), $this->matches)
            ? $this->matches[$this->subject->getName()]->get()
            : $match->get();
    }
282665
protected function createController(Match $match) : ControllerInterface
	{
		// TODO: Use dependency magic to create the controller instance
		/** @var ControllerInterface $controller */
		$controller = new $match->controller();
		$controller->setRouteParams($match->parameters);

		return $controller;
	}