private function findRoute($name)
    {
        if (null === $this->routes) {
            $i18nRouterClass = 'JMS\I18nRoutingBundle\Router\I18nRouterInterface';
            if (interface_exists($i18nRouterClass) && $this->router instanceof $i18nRouterClass) {
                $this->routes = $this->router->getOriginalRouteCollection();
            } else {
                $this->routes = $this->router->getRouteCollection();
            }
        }

        return $this->routes->get($name);
    }
private function findRoute($name)
    {
        if (null === $this->routes) {
            $i18nRouterClass = 'JMS\I18nRoutingBundle\Router\I18nRouterInterface';
            if (interface_exists($i18nRouterClass) && $this->router instanceof $i18nRouterClass) {
                $this->routes = $this->router->getOriginalRouteCollection();
            } else {
                $this->routes = $this->router->getRouteCollection();
            }
        }

        return $this->routes->get($name);
    }
private function findRoute ( $ name ) { if ( null === $ this -> routes ) { $ i18nRouterClass = 'JMS\I18nRoutingBundle\Router\I18nRouterInterface' ; if ( interface_exists ( $ i18nRouterClass ) && $ this -> router instanceof $ i18nRouterClass ) { $ this -> routes = $ this -> router -> getOriginalRouteCollection ( ) ; } else { $ this -> routes = $ this -> router -> getRouteCollection ( ) ; } } return $ this -> routes -> get ( $ name ) ; }
Finds the route for the given name.

@param string $name

@return \Symfony\Component\Routing\Route|null
Finds the route for the given name .