Get the route information for a given route.

@param  string  $name
@param  \Fly\Routing\Route  $route
@return array
161976
protected function getRouteInformation(Route $route)
	{
		$uri = head($route->methods()).' '.$route->uri();

		return $this->filterRoute(array(
			'host'   => $route->domain(),
			'uri'    => $uri,
			'name'   => $route->getName(),
			'action' => $route->getActionName(),
			'before' => $this->getBeforeFilters($route),
			'after'  => $this->getAfterFilters($route)
		));
	}
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;
    }
1328714
public static function getRoute(string $route_name) {
		// return the route of false
		return self::hasRoute($route_name) ? self::$_routes[$route_name] : false;
	}
404324
public function get($name)
    {
        if (!isset($this->routes[$name])) {
            throw new \DomainException('Route does not exist!');
        }

        return $this->routes[$name];
    }
143121
public function routeByName($name)
	{
		if (isset($this->_routes[$name]))
				return $this->_routes[$name];

		if (isset($this->_customRoutes[$name]))
				return $this->_customRoutes[$name];

		throw new LookupException("No route named '$name'");
	}
336766
public function findByName($name)
	{
		return $this->routes->first(function ($route) use($name)
		{
			return $route->getName() === $name;
		});
	}
965
public function getRouteDefinitionByName(string $name): RouteDefinition
    {
        if (!isset($this->routesByName[$name])) {
            throw new \InvalidArgumentException("Invalid route name '$name'");
        }

        return $this->getRouteDefinition($this->routesByName[$name]);
    }
82887
protected function getRouteInformation(Route $route, $filter, $namespace)
    {
        $host    = $route->domain();
        $methods = $route->methods();
        $uri     = $route->uri();
        $name    = $route->getName();
        $action  = $route->getActionName();
        $laroute = array_get($route->getAction(), 'laroute', null);

        if(!empty($namespace)) {
            $a = $route->getAction();

            if(isset($a['controller'])) {
                $action = str_replace($namespace.'\\', '', $action);
            }
        }

        switch ($filter) {
            case 'all':
                if($laroute === false) return null;
                break;
            case 'only':
                if($laroute !== true) return null;
                break;
        }

        return compact('host', 'methods', 'uri', 'name', 'action');
    }
818713
public function routeExists(string $name): bool
    {
        return null !== $this->router->getRouteCollection()->get($name);
    }
1204690
public function routeExists($name)
    {
        return (null === $this->router->getRouteCollection()->get($name)) ? false : true;
    }
580636
public static function get($name)
    {
        if (array_has(self::$filters, 'app.'.$name)) {
            return ['app', array_get(self::$filters, 'app.'.$name)];
        } elseif (array_has(self::$filters, 'route.'.$name)) {
            return ['route', array_get(self::$filters, 'route.'.$name)];
        }

        exception(MiddlewareNotFoundException::class, $name);
    }
507127
public static function getRouteInfo()
    {
        $action 				= \Route::current()->getActionName();
        list($class, $method) 	= explode('@', $action);
        return ['controller_name' => ltrim($class, '\\'), 'method_name' => $method];
    }
982124
protected function getRouteInformation(Route $route)
    {
        list($controller, $action) = explode("@", $route->getActionName());

        return [
            'host' => $route->domain(),
            'method' => implode('|', $route->methods()),
            'uri' => $route->uri(),
            'name' => $route->getName(),
            'controller' => $controller,
            'action' => $action,
            'resource' => $route->getActionName(),
            'middleware' => Collection::make($this->getMiddleware($route))
        ];
    }
422939
private function getDataForAdditionalRoute($route)
    {
         $filter     = $this->config["textfilter"];
         $textFilter = $this->di->get("textfilter");

        // Get filtered content from route
        list($routeIndex, , $filtered) =
            $this->mapRoute2Content($route);

        // Get meta, remove unneeded details
        $meta = $this->getMetaForRoute($route);
        unset($meta["__toc__"]);
        unset($meta["views"]);

        // Do phase 2 processing to get new filtered content
        // (and updated frontmatter)
        $new = $textFilter->parse($filtered->text, $filter);
        $new->frontmatter = array_merge_recursive_distinct($filtered->frontmatter, $new->frontmatter);

        // Creates urls based on baseurl
        $baseurl = isset($new->frontmatter["data"]["baseurl"])
            ? isset($new->frontmatter["data"]["baseurl"])
            : null;
        $this->addBaseurl2AnchorUrls($new, $baseurl);
        $this->addBaseurl2ImageSource($new, $baseurl);

        // Create complete frontmatter, inluding content
        $frontmatter = $new->frontmatter;
        $frontmatter["data"]["content"] = $new->text;

        // Load additional content for view, based on data-meta
        $view = ["main" => $frontmatter];
        $this->loadAdditionalContent($view, $route, $routeIndex);

        return $view["main"];
    }
1351761
private function findRoute($name)
    {
        if (null === $this->routes) {
            $i18nRouterClass = 'JMS\I18nRoutingBundle\Router\I18nRouterInterface';
            if (interface_exists($i18nRouterClass) && $this->router instanceof $i18nRouterClass) {
                $this->routes = $this->router->getOriginalRouteCollection();
            } else {
                $this->routes = $this->router->getRouteCollection();
            }
        }

        return $this->routes->get($name);
    }
150672
public function route($route, $prefix = null)
    {
        $this->route = substr($route, strlen($prefix));
        $parameters = [];

        // Go through predefined routes till a match is found
        foreach ($this->routeOrder as $routeName) {
            $routeDescription = $this->routes[$routeName];
            $parameters = $this->match($this->route, $routeDescription);
            if ($parameters !== false) {
                return [
                    'route' => $this->route,
                    'parameters' => $this->fillInDefaultParameters($routeDescription, $parameters),
                    'description' => $routeDescription
                ];
            }
        }
        return [
            'route' => $this->route,
            'parameters' => $parameters,
            'description' => $this->routes['default']
        ];
    }
1300368
protected function computeMissingRouteParameters(Route $route, array $parameters): array
    {
        $compiledRoute = $route->compile();
        $variables = array_flip($compiledRoute->getVariables());
        $mergedParams = array_replace($route->getDefaults(), $this->router->getContext()->getParameters(), $parameters);

        return array_flip(array_diff_key($variables, $mergedParams));
    }