Extracts the function name from a route definition
@param Route $route route

@return \ReflectionMethod
773422
private function extractFunctionFromRoute(Route $route)
    {
        $controller = explode('::', $this->extractControllerDefaultFromRoute($route));

        return isset($controller[1]) ? $controller[1] : null;
    }
979626
public function gatherRouteMiddlewares( Route $route )
	{
		return Collection::make( $route->middleware() )->map( function ( $name )
		{
			return Collection::make( $this->resolveMiddlewareClassName( $name ) );
		} )->flatten()->all();
	}
246509
public function map(Route $route)
    {
        $this->routes[$route->init()->getRule()] = $route;

        return $this;
    }
889223
protected function getCommandSummary(Route $route)
    {
        $input = $this->resolve($route->input);
        if (! $input instanceof HelpAwareInterface) {
            return 'No description';
        }

        $input->help($this->help);
        return $this->help->getSummary();
    }
61330
private function transformRoute(string $route) : array
    {
        $parameters = $this->extractVariableRouteParts($route);
        foreach ($parameters as $variables) {
            $route = $this->transformRouteVariables($route, $variables);
        }

        $route = '~^'.$route.'$~';

        return [$route, $parameters];
    }
1160379
public function getControllerFromRoute(Route $route)
    {
        $ret = false;
        $actionParts = explode(':', $route->getDefault('_controller'));

        if (count($actionParts) == 2) {
            $ret = $this->container->get($actionParts[0]);
        }

        return $ret;
    }
182307
private function getModuleName($route)
    {
        if ($route) {
            if (strpos($route, '/') !== false) {
                [$id] = explode('/', ltrim($route, '/'), 2);
            } else {
                $id = $route;
            }

            return $id;
        }

        return null;
    }
621386
public function processRouteFilters(Route $route)
	{
		foreach ($this->filterByRoute($route) as $filter) {

			$result = call_user_func_array($filter, func_get_args());
			
			if ($result !== null) {

				return $result;
			}
		}
	}
184353
private function prepareRouteRegexp(string $route): string
    {
        if (!array_key_exists($route, self::$parsed_regexp)) {
            self::$parsed_regexp[$route] = preg_replace(array_keys($this->regexp_map), array_values($this->regexp_map), $route);
        }
        return self::$parsed_regexp[$route];
    }
749322
public function dispatch(Route $route)
    {
        $callback = $route->getCallback();
        $params = array_values($route->getData());

        if ($callback instanceof Closure) {
            return $this->container->resolveClosure($callback, $params);
        }

        $class = $this->container->make($callback[0]);
        return $this->container->resolveMethod($class, $callback[1], $params);
    }
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;
    }
189363
public function get($route)
    {
        if (false === $this->has($route)) {
            return null;
        }

        return $this->generators[$route];
    }
708555
private static function prepareMiddleware(IlluminateRoute $route)
    {
        return array_map(function ($value) {
            return $value instanceof \Closure ? 'Closure' : $value;
        }, self::gatherMiddleware($route));
    }
1108522
protected function parseRoute($route)
    {
        $parsedRoute = parse_url($route);

        if (isset($parsedRoute['query'])) {
            parse_str($parsedRoute['query'], $parsedRoute['params']);
        } else {
            $parsedRoute['params'] = [];
        }

        $resolvedRoute = new Resolver(new \common_http_Request($route));
        $this->propagate($resolvedRoute);
        $parsedRoute['extension']         = $resolvedRoute->getExtensionId();
        $parsedRoute['controller']        = $resolvedRoute->getControllerShortName();
        $parsedRoute['controller_class']  = $resolvedRoute->getControllerClass();
        $parsedRoute['action']            = $resolvedRoute->getMethodName();

        return $parsedRoute;
    }
580264
public function convertRouteParam($route)
    {
        $patterns = array(
            ':any?' => ':[a-zA-Z0-9\.\-_%=]?+',
            ':num?' => ':[0-9]?+',
            ':all?' => ':.?*',
            ':num' => ':[0-9]+',
            ':any' => ':[a-zA-Z0-9\.\-_%=]+',
            ':all' => ':.*',
        );

        $route = str_replace(array_keys($patterns), array_values($patterns), $route);

        return $route;
    }
1049098
private function target(Route $route)
    {
        $params = $route->getParams();

        $target = new Target($params['controller']);

        unset($params['controller']);

        if (isset($params['action'])) {
            $target->setAction($params['action']);
            unset($params['action']);
        }

        $target->setParams($params);

        return $target;
    }
749179
protected function getMethod(RouteMatchInterface $routeMatch): ReflectionMethod
    {
        $action = $this->getAction($routeMatch);

        return new ReflectionMethod($this, $action . $this->getPostfix());
    }