@param string $route

@return array
324106
public function getAliases($route)
    {
        $aliases = [];

        if (is_array($this->routes[$route]) && array_key_exists('aliases', $this->routes[$route])) {
            $aliases = $this->routes[$route]['aliases'];
        }

        return $aliases;
    }
1357003
private function extractPermissionFrom(Route $route)
    {
        $parameters = $route->getAction();

        if (isset($parameters['permission']))
        {
            return $parameters['permission'];
        }

        return null;
    }
1262431
private function match(string $url, Route $route) : array
    {
        $regexp = $this->routeRegexp($route);

        if (preg_match_all('`^' . $regexp . '$`', $url, $matches, PREG_SET_ORDER)) {
            // remove all numeric matches
            $matches = array_diff_key($matches[0], range(0, count($matches[0])));

            // control query string
            if ($route->getUserInputs()) {
                foreach ($route->getUserInputs() as $querystring) {
                    $method = self::request()->getMethod() == 'POST' ? 'getPostOrQuery' : 'getQuery';
                    $value = self::request()->$method($querystring->getName(), $querystring->getType());

                    if (is_null($value) && $querystring->isMandatory()) {
                        return [false, null, $regexp];
                    }

                    if (!is_null($value)) {
                        $matches[$querystring->getName()] = $value;
                    }
                }
            }

            // control conditions
            if ($route->getConditions()) {
                foreach ($route->getConditions() as $condition) {
                    if (!$condition($matches)) {
                        return [false, null, $regexp];
                    }
                }
            }

            return [true, $matches, $regexp];
        }

        return [false, null, $regexp];
    }
509248
protected function getRouteInformation(Route $route)
    {
        if ($route->getName()) {
            return [
                'uri'    => $route->uri(),
                'name'   => $route->getName(),
                'before' => $this->getBeforeFilters($route),
            ];
        }

        return null;
    }
216583
private function getUriParams($route)
    {
        preg_match_all('~{(\w+)}~', $this->getRouteParam($route, 'uri'), $matches);
        
        return isset($matches[1]) ? $matches[1] : [];
    }
1129838
public function getMethodsByRoute($route)
    {
        // Check if a route was provided
        if (!$route) {
            return [];
        }

        // Loop through our routes
        $methods = [];
        foreach ($this->routes as $method => $routes) {
            foreach ($routes as $availableRoute => $callable) {
                // Check if the available route is the same as the specified route
                if ($availableRoute === $route) {
                    $methods[] = $method;
                    continue 2;
                }

                // Check if the route matches
                $regex = '/^' . str_replace('/', '\/', $availableRoute) . '/Uim';
                if (preg_match($regex, $route, $matches) === 1 && $matches[0] === $route) {
                    $methods[] = $method;
                    continue 2;
                }
            }
        }

        // Return the methods array
        return $methods;
    }
435666
protected function getRouteInformation(Route $route)
    {
        if ($route->getName()) {
            return [
                'uri'        => $route->uri(),
                'name'       => $route->getName(),
                'middleware' => $route->middleware(),
            ];
        }

        return null;
    }
842230
public function gatherRouteMiddlewares($route)
    {
        if (method_exists($this->router, 'gatherRouteMiddleware')) {
            return $this->router->gatherRouteMiddleware($route);
        }

        return $this->router->gatherRouteMiddlewares($route);
    }
612457
public function getRouteMiddleware($route)
    {
        return collect($route->gatherMiddleware())->map(function ($middleware) {
            return $middleware instanceof Closure ? 'Closure' : $middleware;
        })->implode(',');
    }
823978
protected function buildRoute(Route $route)
    {
        if ($route->getBlock()) {
            return $route;
        }

        list($pattern, $params) = $this->parsePlaceholders($route->getPattern());
        return $route->setPatternWithoutReset($pattern)->setParams($params)->setBlock(true);
    }
404852
protected function getRouteRequirementParams(array $route)
    {
        $params = [];
        if (isset($route['requirements'])) {
            foreach ($route['requirements'] as $fieldName => $requirement) {
                if ('\d{4}-\d{2}-\d{2}' === $requirement) {
                    // Special case, if we need to have a date
                    $params[$fieldName] = substr($this->get($fieldName), 0, 10);
                } elseif ($this->getTaxonomy() !== null && !$this->getTaxonomy()->getField($fieldName)->isEmpty()) {
                    // This is for new storage handling of taxonomies in
                    // contentroutes. If in legacy it will fall back to the one
                    // below.
                    $params[$fieldName] = $this->getTaxonomy()->getField($fieldName)->first()->getSlug();
                } elseif (isset($this->taxonomy[$fieldName])) {
                    // Turn something like '/groups/meta' to 'meta'. This is
                    // only for legacy storage.
                    $tempKeys = array_keys($this->taxonomy[$fieldName]);
                    $tempValues = explode('/', array_shift($tempKeys));
                    $params[$fieldName] = array_pop($tempValues);
                } elseif ($this->get($fieldName)) {
                    $params[$fieldName] = $this->get($fieldName);
                } elseif (isset($route['defaults'][$fieldName])) {
                    $params[$fieldName] = $route['defaults'][$fieldName];
                } else {
                    // unknown
                    $params[$fieldName] = null;
                }
            }
        }

        return $params;
    }
165833
private function getMiddleWareFromRoute(Route $route)
    {
        if (!$route->group) {
            return $route->middleWare;
        }
        $groupMiddleWare = $this->getMiddleWareFromGroup($route->group);
        return \array_merge($groupMiddleWare, $route->middleWare);
    }
982186
protected static function funcPost($route)
    {
        $params = self::dynamic($route);
        //
        if (count($params) > 0) {
            return 'post(\''.$route.'\',function('.self::formatParams($params).')';
        } else {
            return 'post(\''.$route.'\',function()';
        }
    }
1256773
public function extractRoutePath(string $route)
    {
        $url = (strpos($route, '/') === false) ? url($route) : $route;
        $this->router->handle($url);

        return $this->router->getMatchedRoute()->getPaths();
    }
524797
protected function getRouteInformation(Route $route)
    {
        $methods = implode('|', $route->methods());

        return $this->filterRoute(array(
            'host'       => $route->domain(),
            'method'     => $methods,
            'uri'        => $route->uri(),
            'name'       => $route->getName(),
            'action'     => $route->getActionName(),
            'middleware' => $this->getMiddleware($route),
        ));
    }
1234280
public function getRouteProperties($route, Request $request)
    {
        $uri = ltrim(isset($route['uri']) ? $route['uri'] : $request->getRequestUri(), '/');
        $methods = isset($route['methods']) ? $route['methods'] : (array) $request->getMethod();
        $action = (isset($route[1]) && is_array($route[1])) ? $route[1] : $route;

        if (in_array('GET', $methods) && ! in_array('HEAD', $methods)) {
            $methods[] = 'HEAD';
        }

        return [$uri, $methods, $action];
    }
970717
protected static function dynamic($route)
    {
        $parms = [];
        $param = '';
        $open = false;
        //
        for ($i = 0; $i < Strings::length($route); $i++) {
            if ($open && $route[$i] != '}') {
                $param .= $route[$i];
            }
            //
            if ($route[$i] == '{' && !$open) {
                $open = true;
            } //
            elseif ($route[$i] == '}' && $open) {
                $open = !true;
                $parms[] = $param;
                $param = '';
            }
        }
        //
        return $parms;
    }