Returns a route definition by the name of the route.
@param string $name The name of the route
@return RouteDefinition The route definition with the given 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]);
    }
1230294
public function get(string $name): Closure
    {
        if ( ! $this->has($name)) {
            throw new DefinitionNotFoundException("No breadcrumbs defined for route [{$name}].");
        }

        return $this->definitions[$name];
    }
936770
public function getRoute(string $type, string $name): string{
        return $this->routes[$name][$type];
    }
714966
public function getNamedRoute(string $name) : Route
    {
        $this->buildNameIndex();

        if (isset($this->namedRoutes[$name])) {
            return $this->namedRoutes[$name];
        }

        throw new InvalidArgumentException(sprintf('No route of the name (%s) exists', $name));
    }
939432
public function getRouteByName($name)
    {
        if (!isset($this->routes[$name])) {
            return null;
        }
        return $this->routes[$name];
    }
1317905
public function findRoute($name)
    {
        if(isset($this->routes[$name]))
            return $this->routes[$name];

        // alias check
        if(isset($this->aliasIndices[$name])) {
            $name = $this->aliasIndices[$name];
        } else {
            foreach($this->groupAliasIndices as $alias => $routeName) {
                if(strpos($name, $alias) === 0) {
                    $name = substr_replace($name, $routeName, 0, strlen($alias));
                    break;
                }
            }
        }

        if($route = $this->findRouteRecursively($name))
            return $this->routes[$name] = $route;

        return false;
    }
1227572
public function getRoute($name)
    {
        if (! $this->hasOption($name)) {
            throw new \common_Exception('Route ' . $name . ' not found into UrlService config');
        }
        return $this->getOption($name);
    }
185478
protected function getTranslationName($name)
    {
        $name = $this->getRouteName($name);
        $name = array_last(explode('.', $name));

        return $name;
    }
862910
public function getNamedRoute($name)
    {
        if (is_null($this->namedRoutes)) {
            $this->buildNameIndex();
        }
        if (!isset($this->namedRoutes[$name])) {
            throw new RuntimeException('Named route does not exist for name: '.$name);
        }

        return $this->namedRoutes[$name];
    }
407439
public function route($name)
    {
        if (array_key_exists($name, $this->allNames)) {
            return $this->allNames[$name];
        }

        return null;
    }
875399
public function resolveRoute(string $originalUrl): RouteDefinition
    {
        foreach ($this->routes as $route) {
            /** @var Url $routeOriginalUrl */
            $routeOriginalUrl = $route->originalUrl();

            if ($routeOriginalUrl->matches(Url::fromString($originalUrl))) {
                return $route;
            }
        }

        throw new RouteNotFound(\sprintf(
            'Route "%s" could not be found.',
            $originalUrl
        ));
    }
887179
public function getDefinition($name)
    {
        return isset($this->_definitions[$name]) ? $this->_definitions[$name] : null;
    }
575259
protected function getRoutePath($name)
    {
        $routeName = str_replace_first('api.', '', $this->getRouteName($name));
        $routeNameExploded = explode('.', $routeName);
        $routePath = str_replace('.', '/', $routeName);
        if ($this->option('parent') && count($routeNameExploded) >= 2) {
            $routePath = str_replace_last('/', '.', $routePath);
        }
        return $routePath;
    }
304898
public function getRoute($name)
    {
        if (!isset($this->routes[$name])) {
            throw new \LogicException(sprintf('Route "%s" not found.', $name));
        }
        
        return $this->routes[$name];
    }
1273709
public function get($name)
    {
        if (!$this->hasRoute($name)) {
            throw new Exception\MissingRoute($name);
        }

        return $this->nameCache[$name];
    }
612091
public function getPath(string $name = null)
    {
        if (is_null($name)) {
            return $this->get('path');
        }

        return $this->get('path', $name);
    }
1353192
public function getRouteDefinition(int $routeId): RouteDefinition
    {
        if (!isset($this->routeDefinitions[$routeId])) {
            throw new \InvalidArgumentException("Invalid route id '$routeId'");
        }

        return RouteDefinition::createFromCache($this->routeDefinitions[$routeId]);
    }