Sets the Reference to Symfony's routing service.

@param Symfony\Component\Routing\Router $router the router

@return self
767646
public function setRouter(Symfony\Component\Routing\Router $router)
    {
        $this->router = $router;

        return $this;
    }
30679
public static function apiRoutes(\Illuminate\Routing\Router $router)
    {
        $router->group(['prefix' => 'translations'], function (\Illuminate\Routing\Router $router) {

            $router->get('/index', [
                'as'   => 'translations.api.index',
                'uses' => ApiController::class . '@index'
            ]);
        });
    }
332964
protected function buildMetaRoutes(Router $router)
    {
        $router->group(
            [
                'prefix' => 'meta',
            ],
            function (Router $router) {

                $router->post('set-locale', [
                    'as'   => NamedRoute::LOCALE_SET,
                    'uses' => LocaleController::class . '@setLocale',
                ]);
            }
        );

    }
155267
public function bindToRouter(RouterInterface $router)
    {
        $this->callable = sprintf('%s:%s', $this->getActionClass(),
            $this->getActionMethod());

        // TODO Remove and use createCollection() / fetchCollection()
        if ($this->isMakeCollection()) {
            $this->add(new CollectionFetch($this->container, $this));
        }

        $router->addResourceRoute($this);
    }
1264433
public function boot(\Illuminate\Routing\Router $router)
    {
        if (! $this->app->routesAreCached()) {
            require __DIR__.'/Routes/web.php';
        }

        $this->publishes([
            __DIR__.'/Config/links.php' => config_path('links.php'),
        ], 'links_config');

        $router->aliasMiddleware('links.middleware', config('links.middleware'));

        $this->app->register(IdentifyServiceProvider::class);
        $this->app->register(ChartsServiceProvider::class);

        $this->loadViewsFrom(__DIR__.'/Views', 'links');

        $this->loadMigrationsFrom(__DIR__.'/Migrations');
    }
512550
protected function setupRouter(Request $request)
    {
        if ($request instanceof Request\Web) {
            $router = $this->getRouter();
            if (
                $router instanceof Router\RouterCuInterface
                && $router->isRequestedUrlClean($request))
            {
                $router->enableCleanUrls();
            }
        }

        return $this;
    }
1056741
public function map(Router $router)
    {
        if ($this->isEnabled()) {
            $router->group($this->routeAttributes(), function() {
                Routes\RouteViewerRoutes::register();
            });
        }
    }
1216856
public function map(Router $router)
    {
        $router->group(array('namespace' => $this->namespace), function ($router)
        {
            $basePath = $this->guessPackageRoutesPath();

            if (is_readable($path = $basePath .DS .'Api.php')) {
                $router->group(array('prefix' => 'api', 'middleware' => 'api'), function ($router) use ($path)
                {
                    require $path;
                });
            }

            if (is_readable($path = $basePath .DS .'Web.php')) {
                $router->group(array('middleware' => 'web'), function ($router) use ($path)
                {
                    require $path;
                });
            }
        });
    }
373807
protected function getRouter(): Router
    {
        if ($this->router === null) {
            $this->router = new Router($this->collection, $this->getDispatcher(), $this->getFilters());
        }

        return $this->router;
    }
659734
public function boot(Router $router)
    {
        $this->defineRoutes($router);

        $this->loadViewsFrom(__DIR__.'/../resources/views', 'warden');
        $this->publishes([
            __DIR__.'/../resources/views' => base_path('resources/views/vendor/warden'),
        ], 'views');
        $this->publishes([
            __DIR__.'/../config/config.php' => config_path('kregel/warden.php'),
        ], 'config');
    }
466729
public function mapWebRoutes(Router $router)
    {
        foreach ($this->modules as $module) {
            $module->mapWebRoutes($router);
        }
    }
925936
public function map(Router $router)
    {
        $this->app['events']->fire('routes.loading');

        foreach ($this->app['modules.loader']->getRegisteredModules() as $module) {
            $this->app->call([$module, 'loadRoutes'], [$router]);
        }

        $this->app['events']->fire('routes.loaded');
    }
618192
private function setRequest(&$di, &$router)
    {
        $di->set('router', $router);

        $di->set('url', function () {
            $url = new \Phalcon\Mvc\Url();
            $url->setBaseUri(QP_ROOT_PATH);
            return $url;
        });

        $di->set('view', function () {
            $view = new \Phalcon\Mvc\View();
            $view->setViewsDir(QP_VIEW_PATH);
            return $view;
        });
    }
1309988
protected function loadRoutes(Router $router)
    {
        $router->group([
            'namespace' => $this->namespace,
            'middleware' => config('forum.frontend.middleware'),
            'as' => config('forum.routing.as'),
            'prefix' => config('forum.routing.prefix')
        ], function ($router) {
            Forum::routes($router);
        });
    }
331249
public function setupRoutes(Router $router)
    {
        // by default, use the routes file provided in vendor
        $routeFilePathInUse = __DIR__.$this->routeFilePath;
        // but if there's a file with the same name in routes/backpack, use that one
        if (file_exists(base_path().$this->routeFilePath)) {
            $routeFilePathInUse = base_path().$this->routeFilePath;
        }
        $this->loadRoutesFrom($routeFilePathInUse);
    }
845991
public function map(Router $router)
    {
        $router->bind('widget', function ($id) use ($router) {
            if ($router->is(admin_prefix() . '*')) {
                return Widget::withoutGlobalScope('menu_assignment')->findOrFail($id);
            }

            return Widget::findOrFail($id);
        });

        $this->mapWebRoutes($router);
    }
276043
protected function loadRoutes(Router $router): void
    {
        foreach ($this->getRoutes() as $route) {
            $router->namespace($this->namespace)
                ->group($route);
        }
    }