private function findRouteByName($name)
    {
        if (null === $route = $this->routes->get($name)) {
            throw new \RuntimeException(sprintf('Route "%s" not found.', $name));
        }

        return $route;
    }
private function findRouteByName($name)
    {
        if (null === $route = $this->routes->get($name)) {
            throw new \RuntimeException(sprintf('Route "%s" not found.', $name));
        }

        return $route;
    }
private function findRouteByName ( $ name ) { if ( null === $ route = $ this -> routes -> get ( $ name ) ) { throw new \ RuntimeException ( sprintf ( 'Route "%s" not found.' , $ name ) ) ; } return $ route ; }
Finds a route by name

@param string $name

@throws \RuntimeException

@return \Symfony\Component\Routing\Route|NULL
Finds a route by name