Returns the generator for the given route or `null` if no generator exists.

@param string $route Name of a route.

@return GeneratorInterface Generator for the given route or `null` if no generator exists.
189363
public function get($route)
    {
        if (false === $this->has($route)) {
            return null;
        }

        return $this->generators[$route];
    }
1343533
public function getController($route = null)
		{
		    $router = $this->init($route == null)->router;
			return $route
                ? $router->getController($route)
                : $router->getControllers();
		}
226424
private function checkForMetaRoute($route)
    {
        $this->baseRoute = $route;
        $this->metaRoute = null;

        // If route exits in index, use it
        if ($this->mapRoute2IndexKey($route)) {
            return $route;
        }

        // Check for pagination
        $pagination = $this->config["pagination"];
        $matches = [];
        $pattern = "/(.*?)\/($pagination)\/(\d+)$/";
        if (preg_match($pattern, $route, $matches)) {
            $this->baseRoute = $matches[1];
            $this->metaRoute = $route;
            $this->currentPage = $matches[3];
        }

        return $this->baseRoute;
    }
516169
protected function getRouteResource($route)
	{
		if (!config('openapischemas.resource_tag')) {
			$this->parentCommand->error('The "resource_tag" value in your apischemas.php configuration file must defined.');
			exit();
		}
		$routeAction = $route->getAction();
		list($class, $method) = explode('@', $routeAction['uses']);
		$reflection = new ReflectionClass($class);

		$comment = $reflection->getDocComment();
		if ($comment) {
			$docBlock = $this->docBlockFactory->create($comment);
			foreach ($docBlock->getTags() as $tag) {
				if ($tag->getName() === config('openapischemas.resource_tag')) {
					return $tag->getDescription()->render();
				}
			}
		}

		return null;
	}
579604
protected function getRouteScheme( $route )
	{
		if ( $route->httpOnly() )
		{
			return $this->getScheme( false );
		}
		elseif ( $route->httpsOnly() )
		{
			return $this->getScheme( true );
		}

		return $this->getScheme( null );
	}
323256
public static function get( $route = null, $callback = null ) {
		// Make sure that our parameters are what they say they are
		$args = self::smart_parameters( func_get_args() );

		return self::route( 'GET', $args[ 'route' ], $args[ 'callback' ] );
	}
153184
protected function buildRouteAction(Route $route)
    {
        $action = $route->getAction();

        if ($action instanceof \Closure) {

            $controller = new Controller();

            return $action->bindTo($controller, get_class($controller));
        }

        list ($class, $method) = $action;

        $class = new $class;

        return [$class, $method];
    }
1364623
public static function transRouteExternal($route) {
        $app = app();
        $locale = \Sirgrimorum\CrudGenerator\CrudGenerator::setLocale();
        //$locale = $app->getLocale();
        $transroute = $app->translator->trans($route, [], $locale);
        return $transroute;
    }
1018928
function create($route) {
        $route->pattern = $this->parser->trimPath($route->pattern);
        return parent::create($route);
    }
1022150
public function get($route)
    {
        $this->ensureStorage();

        return isset($this->storage[$route]) ? $this->storage[$route] : null;
    }
144189
public function url($route, $params)
    {
        // use array filter to remove keys with null values
        $params += array_filter($this->getEmbedParams());

        return $this->router->generate($route, $params);
    }
1129819
public function url($route, $parameters = array())
    {
        return $this->silex['url_generator']->generate($route, $parameters, \Symfony\Component\Routing\Generator\UrlGeneratorInterface::ABSOLUTE_URL);
    }
982434
public function getRoute($route = null)
    {
        $routes = $this->getConsole()->getRoutes($route);
        $l1 = 10; $l2 = 10; $l3 = 10;
        $list = "";
        foreach($routes as $route) {
            if($l1 < strlen($route[1])) {
                $l1 = strlen($route[1]);
            }
            if($l2 < strlen($route[0])) {
                $l2 = strlen($route[0]);
            }
            if($l3 < strlen($route[2])) {
                $l3 = strlen($route[2]);
            }
        }
        foreach($routes as $route) {
            $list .= 
"| $route[1]".str_repeat(' ',$l1-strlen($route[1]))." | $route[0]".str_repeat(' ',$l2-strlen($route[0]))." | $route[2]".str_repeat(' ',$l3-strlen($route[2]))." |
+".str_repeat('-',$l1+2)."+".str_repeat('-',$l2+2)."+".str_repeat('-',$l3+2)."+
";
        }
        $list = "
+".str_repeat('-',$l1+2)."+".str_repeat('-',$l2+2)."+".str_repeat('-',$l3+2)."+
| ".Colors::GREEN.Colors::BG_BLACK."URI".Colors::WHITE.Colors::BG_BLACK.str_repeat(' ',$l1-strlen('URI'))." | ".Colors::GREEN.Colors::BG_BLACK."Method".Colors::WHITE.Colors::BG_BLACK.str_repeat(' ',$l2-strlen('Method'))." | ".Colors::GREEN.Colors::BG_BLACK."Action".Colors::WHITE.Colors::BG_BLACK.str_repeat(' ',$l3-strlen('Action'))." |
+".str_repeat('-',$l1+2)."+".str_repeat('-',$l2+2)."+".str_repeat('-',$l3+2)."+
".$list;
        return $list;
    }
1308384
public function path($route, $parameters = array())
    {
        return $this->silex['url_generator']->generate($route, $parameters, \Symfony\Component\Routing\Generator\UrlGeneratorInterface::ABSOLUTE_PATH);
    }
1165717
public function callbackFunction($route = null, $parameters = [])
    {
        if ($route === null || ! is_string($route)) {
            // Gets URI from current request
            $uri = $this->request->getUri();
        } else {
            // Generates URI from '_route'
            $uri = $this->router->generate(
                $route,
                $parameters,
                Router::ABSOLUTE_URL
            );
        }

        $result = parse_url($uri);

        // When uri contains query string
        if (isset($result['query'])) {

            parse_str($result['query'], $query);

            // Remove callback from query
            $query = array_diff_key($query, ['callback' => null]);
        } else {
            // Return unchanged uri
            return $uri;
        }

        return $result['scheme'].'://'.
               (isset($result['user']) ? $result['user'] : '').
               (isset($result['pass']) ? ':'.$result['pass'].'@' : '').
               $result['host'].
               (isset($result['port']) ? ':'.$result['port'] : '').
               (isset($result['path']) ? $result['path'] : '').
               ($query != [] ? '?'.http_build_query($query) : '').
               (isset($result['fragment']) ? '#'.$result['fragment'] : '');
    }
70719
public function contentForRoute($route = null)
    {
        $content = $this->contentForInternalRoute($route);
        if ($content->internal === true) {
            $msg = t("The content '!ROUTE' does not exists as a public route.", ["!ROUTE" => $route]);
            throw new \Anax\Exception\NotFoundException($msg);
        }

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

        return $this->router->gatherRouteMiddlewares($route);
    }