Define the routes for the application.

@return void
554095
public function mapRoutes($dir)
    {
      $dir = $dir.'routes';

      if (file_exists($dir)) {
        $files = glob($dir . '/*.php');
        foreach($files as $file){
          if(file_exists($file))
            require($file);
        }
      }

    }
1107647
public function loadRoutes()
    {
        $routeFiles = $this->config["routeFiles"];
        foreach ($routeFiles as $file) {
            $this->loadFile($file, ["app" => $this]);
        }
        return $this;
    }
139867
protected function gatherRoutes()
    {
        // Get the base route path
        $basePath = $this->container->get('app.base_path');
        $routesPath = $this->container->get('app.routes_path');

        // Include the route file
        include $basePath . DIRECTORY_SEPARATOR . $routesPath;
    }
183895
protected function bootstrap()
    {
        $this->make('Sun\Bootstrap\Application')->bootstrap();

        $this->make('Sun\Bootstrap\HandleExceptions')->bootstrap();

        $this->make('Sun\Bootstrap\Route')->bootstrap();

        $this->make('Sun\Bootstrap\Provider')->bootstrap();

        $this->route = $this->make('Sun\Contracts\Routing\Route');
    }
358529
public function route()
    {
        $this->dashboardRouting($this->relativeCmsUri);
        $this->logOffRouting($this->request, $this->relativeCmsUri);
        $this->apiRouting($this->relativeCmsUri);
        $this->documentRouting($this->userRights, $this->relativeCmsUri);
        $this->valuelistsRouting($this->userRights, $this->relativeCmsUri);
        $this->sitemapRouting($this->userRights, $this->relativeCmsUri);
        $this->redirectRouting($this->userRights, $this->relativeCmsUri);
        $this->imageRouting($this->userRights, $this->relativeCmsUri);
        $this->filesRouting($this->userRights, $this->relativeCmsUri);
        $this->configurationRouting($this->userRights, $this->relativeCmsUri);
        $this->searchRouting($this->relativeCmsUri);
    }
365843
protected function mapWebRoutes(): void
    {
        $file = $this->basePath.'routes/web.php';

        if (file_exists($file)) {
            $this->loadRoutesFrom(
                Route::middleware('web')
                ->group($file));
        }
    }
225814
public function setupRoutes()
    {
        foreach ($this->paths as $oldPath => &$newPath) {
            $this->addRedirection($oldPath, $newPath);
        }
    }
890009
protected function scanRoutes()
    {
        $scans = $this->routeScans();

        if (empty($scans)) {
            return;
        }

        $scanner = $this->app->make('annotations.route.scanner');

        $scanner->setClassesToScan($scans);

        file_put_contents(
          $this->finder->getScannedRoutesPath(), '<?php '.$scanner->getRouteDefinitions()
        );
    }
758991
private function setRoutes() : void
    {
        $this->routes = $this->routeProvider->getRoutes();
        $this->syRouteCollection = new RouteCollection();
        foreach ($this->routes as $route) {
            $syRoute = new SymfonyRoute(
                $route->getPath(),
                $route->getParamsDefaults(),
                $route->getParamsRequirements(),
                [],
                '',
                [],
                $route->getMethods()
            );
            $this->syRouteCollection->add($route->getName(), $syRoute);
        }
    }
207827
public function registerRoutes()
    {
        if ($this->app->routesAreCached()) {
            return;
        }

        Route::domain((string) config('platform.domain'))
            ->prefix(Dashboard::prefix('/press'))
            ->as('platform.')
            ->middleware(config('platform.middleware.private'))
            ->group(realpath(PLATFORM_PATH.'/routes/press.php'));
    }
793132
public function route()
    {
        global $logger;
        try {
            // TODO : Refactor Code :
            // $url    = URLParser::parse();
            // $route  = RouteMapper::getRoute($url['route']);
            // $router = new Router();
            // $router->route($route);
            $urlInterpreter = new UrlInterpreter();
            $command        = $urlInterpreter->getCommand();
            $router         = new Router($command);
            $logger->debug('Routing to : '.$command->getControllerName());
            $router->route();
        } catch (Exception $e) {
            throw new RouteNotFoundException();	
        }
    }
654899
protected function loadRoutes()
    {
        $builder = Router::createRouteBuilder('/');

        if ($this->app instanceof HttpApplicationInterface) {
            $this->app->routes($builder);
        }
        if ($this->app instanceof PluginApplicationInterface) {
            $this->app->pluginRoutes($builder);
        }
    }
1345989
protected function loadRoutes()
    {
        $path = $this->extensionPath;

        $routes = [
            'backend'  => [
                $path . DIRECTORY_SEPARATOR . 'Http' . DIRECTORY_SEPARATOR . 'backend.php',
                $path . DIRECTORY_SEPARATOR . 'backend.php',
                $path . DIRECTORY_SEPARATOR . 'routes.php',
            ],
            'frontend' => [
                $path . DIRECTORY_SEPARATOR . 'Http' . DIRECTORY_SEPARATOR . 'frontend.php',
                $path . DIRECTORY_SEPARATOR . 'frontend.php',
            ]
        ];
        foreach ($routes as $area => $routePaths) {
            foreach ($routePaths as $route) {
                if (!file_exists($route)) {
                    continue;
                }
                switch ($area) {
                    case 'frontend':
                        $this->loadFrontendRoutesFrom($route);
                        break;
                    case 'backend':
                        $this->loadBackendRoutesFrom($route);
                        break;
                }
            }
        }
    }
1323811
protected function paths()
    {
        $paths = array('APPPATH' => $this->constants['APPPATH']);

        $paths['VENDOR'] = $this->constants['VENDOR'];

        $paths['VIEWPATH'] = $this->constants['VIEWPATH'];

        foreach ((array) $paths as $key => $value) {
            $defined = defined($key);

            $defined || define($key, $value);
        }

        defined('BASEPATH') || $this->basepath();
    }
967437
public function setupRoutes()
    {
        if (!isset($this->routeManager)) {
            $config = $this->config();
            $routes = (isset($config['routes']) ? $config['routes'] : [] );

            $this->routeManager = new RouteManager([
                'config' => $routes,
                'app'    => $this->app(),
                'logger' => $this->logger
            ]);

            $this->routeManager->setupRoutes();
        }

        return $this;
    }
999090
public function map()
    {
        $themeName = ltrim(
            str_replace(themes_path(), '', realpath(__DIR__.'/../../')),
            '\/'
        );

        Route::middleware('web')
            ->namespace($this->namespace)
            ->group(themes_path($themeName.'/routes.php'));
    }
133116
protected function mapAdminRoutes()
    {
        $this->name('seo.')
             ->prefix($this->config()->get('arcanesoft.seo.route.prefix', 'seo'))
             ->group(function () {
                 Routes\Admin\DashboardRoutes::register();
                 Routes\Admin\PagesRoutes::register();
                 Routes\Admin\FootersRoutes::register();
                 Routes\Admin\MetasRoutes::register();
                 Routes\Admin\RedirectsRoutes::register();
                 Routes\Admin\SpammersRoutes::register();
                 Routes\Admin\SettingsRoutes::register();
             });
    }