src/Chiron/Routing/Router.php
public function getNamedRoute(string $name): Route
    {
        foreach ($this->getRoutes() as $route) {
            if ($route->getName() === $name) {
                return $route;
            }
        }

        throw new InvalidArgumentException('Named route does not exist for name: ' . $name);
    }
public function getNamedRoute(string $name): Route
    {
        foreach ($this->getRoutes() as $route) {
            if ($route->getName() === $name) {
                return $route;
            }
        }

        throw new InvalidArgumentException('Named route does not exist for name: ' . $name);
    }
public function getNamedRoute ( string $ name ) : Route { foreach ( $ this -> getRoutes ( ) as $ route ) { if ( $ route -> getName ( ) === $ name ) { return $ route ; } } throw new InvalidArgumentException ( 'Named route does not exist for name: ' . $ name ) ; }
Get a named route.

@param string $name Route name

@throws \InvalidArgumentException If named route does not exist

@return \Chiron\Routing\Route
Get a named route .