src/Router.php
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));
    }
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));
    }
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 ) ) ; }
Get a named route

@param string $name

@throws \InvalidArgumentException when no route of the provided name exists.

@return \League\Route\Route
Get a named route