core-bundle/src/Routing/LegacyRouteProvider.php
public function getRouteByName($name): Route
    {
        if ('contao_frontend' === $name || 'contao_index' === $name) {
            return $this->frontendLoader->load('.', 'contao_frontend')->get($name);
        }

        if ('contao_root' === $name) {
            return new Route(
                '/',
                [
                    '_scope' => 'frontend',
                    '_token_check' => true,
                    '_controller' => 'Contao\CoreBundle\Controller\FrontendController::indexAction',
                ]
            );
        }

        if ('contao_catch_all' === $name) {
            return new Route(
                '/{_url_fragment}',
                [
                    '_scope' => 'frontend',
                    '_token_check' => true,
                    '_controller' => 'Contao\CoreBundle\Controller\FrontendController::indexAction',
                ],
                ['_url_fragment' => '.*']
            );
        }

        return $this->routeProvider->getRouteByName($name);
    }
public function getRouteByName($name): Route
    {
        if ('contao_frontend' === $name || 'contao_index' === $name) {
            return $this->frontendLoader->load('.', 'contao_frontend')->get($name);
        }

        if ('contao_root' === $name) {
            return new Route(
                '/',
                [
                    '_scope' => 'frontend',
                    '_token_check' => true,
                    '_controller' => 'Contao\CoreBundle\Controller\FrontendController::indexAction',
                ]
            );
        }

        if ('contao_catch_all' === $name) {
            return new Route(
                '/{_url_fragment}',
                [
                    '_scope' => 'frontend',
                    '_token_check' => true,
                    '_controller' => 'Contao\CoreBundle\Controller\FrontendController::indexAction',
                ],
                ['_url_fragment' => '.*']
            );
        }

        return $this->routeProvider->getRouteByName($name);
    }
public function getRouteByName ( $ name ) : Route { if ( 'contao_frontend' === $ name || 'contao_index' === $ name ) { return $ this -> frontendLoader -> load ( '.' , 'contao_frontend' ) -> get ( $ name ) ; } if ( 'contao_root' === $ name ) { return new Route ( '/' , [ '_scope' => 'frontend' , '_token_check' => true , '_controller' => 'Contao\CoreBundle\Controller\FrontendController::indexAction' , ] ) ; } if ( 'contao_catch_all' === $ name ) { return new Route ( '/{_url_fragment}' , [ '_scope' => 'frontend' , '_token_check' => true , '_controller' => 'Contao\CoreBundle\Controller\FrontendController::indexAction' , ] , [ '_url_fragment' => '.*' ] ) ; } return $ this -> routeProvider -> getRouteByName ( $ name ) ; }
{@inheritdoc}
{