Define the routes for the application.

@return null
968610
public function map()
    {
        Route::namespace($this->namespace)->group(function (Router $router) {
            /*
             * API routes
             */
            $router->middleware('api')->prefix('api')->group(function (Router $router) {
                $router->middleware('auth:api')->group(function (Router $router) {
                    $router->get('history', 'ApiController@index')->middleware('can:see-history');
                    $router->delete('history', 'ApiController@destroy')->middleware('can:clear-history');
                });
            });
        });
    }
408117
public function currentRouteAction()
	{
		if ( ! $this->current()) return;

		$action = $this->current()->getAction();

		return isset($action['controller']) ? $action['controller'] : null;
	}
828203
public function getRoutes()
	{
		$router_factory = new RouterFactory;
		$router = $router_factory->newInstance();

		$routes_file = $this->getAppResourcePath('config/routes.php');

		if (file_exists($routes_file)) {
			// Let the app specify it's own routes.
			include_once($routes_file);
		} else {
			// Fall back on some sensible defaults.
			$router->add(null, '/');
			$router->add(null, '/{controller}');
			$router->add(null, '/{controller}/{action}');
			$router->add(null, '/{controller}/{action}/{id}');
		}

		$this->router = $router;
	}
1051408
public static function routes()
    {
        Route::name('public::blog.')
            ->prefix('blog')
            ->namespace('\\Arcanesoft\\Blog\\Http\\Controllers\\Front')
            ->group(function () {
                Routes\PostsRoutes::register();
                Routes\CategoriesRoutes::register();
                Routes\TagsRoutes::register();
            });
    }
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();	
        }
    }
1336354
public function routes($method = null)
    {
        if ($method && isset($this->methods[$method])) {
            return $this->routes[$method];
        }
        return $this->routes;
    }
1119407
private function mapAdminRoutes()
    {
        $this->name('blog.')
             ->prefix($this->config()->get('arcanesoft.blog.route.prefix', 'blog'))
             ->group(function () {
                 Routes\Admin\StatsRoutes::register();
                 Routes\Admin\PostsRoutes::register();
                 Routes\Admin\CommentsRoutes::register();
                 Routes\Admin\CategoriesRoutes::register();
                 Routes\Admin\TagsRoutes::register();
            });
    }
145947
public function routes()
    {
        if (empty($this->routes))
        {
            $this->routes = $this->configureSlice()->asArray();
        }

        return $this->routes;
    }
74526
public function setupRoutes()
    {
        if ($this->routeManager === null) {
            parent::setupRoutes();

            // Serve the Admin's "Not Found" handler for the Admin's route group.
            $this->app()->any('{catchall:.*}', 'notFoundHandler');
        }

        return $this;
    }
1134927
public function readRoutes()
    {
        // routes begin with method
        $this->__method = $this->detectMethod();

        // find all matching routes
        $try_routes = array();
        foreach($this->__routes as $route) {
            // correct request type
            if(substr($route,0,strlen($this->__method)) == $this->__method) {
                $params = $this->routeParams($route);    
                if ($params !== false && $this->hasParams($params)) {
                    if (!isset($try_routes[count($params)])) {
                        $try_routes[count($params)] = array();
                    }
                    $try_routes[count($params)][] = $route;
                } elseif ($params === false) {
                    $try_routes[0] = array($route);
                }
            }
        }
        
        // use the route with the most parameters
        // set class variables to parameters
        $num_params = array_keys($try_routes);
        rsort($num_params);
        $this->__route_stem = 'unknownRequest';
        if (count($num_params) > 0) {
            $longest = $num_params[0];
            $best_route = array_pop($try_routes[$longest]);
            $this->__route_stem = $this->__method;
            if ($longest > 0) {
                foreach($this->routeParams($best_route) as $param) {
                    $this->$param = $this->form->$param;
                    $this->__route_stem .= '_'.$param;
                }
            }
        }
    }
803763
public function routing()
    {
        // has dispatch.
        $route = null;
        if ($action = $this->getDispatchAction()) {
            $route = new Rule\MatchRule(array('action' => $action));
        }

        // root rule.
        $path = $this->request->getPath();
        if (! $route && $this->_root && $this->_root->match($path)) {
            $route = $this->_root;
        }

        // match rule.
        if (! $route) {
            foreach ($this->_rules as $rule) {
                if ($rule->match($path)) {
                    $route = $rule;
                    break;
                }
            }
        }

        // default rule.
        if (! $route && $this->_default && $this->_default->match($path)) {
            $route = $this->_default;
        }

        // not found
        if (! $route || ! $this->isActionExists($route)) {
            $route = new Rule\NotFoundRule();
        }
        return $route;
    }
260192
public function currentRouteAction()
    {
        if (! $route = $this->current()) {
            return;
        }

        $action = $route->getAction();

        return is_string($action['uses']) ? $action['uses'] : null;
    }
657353
public function getRoute() {
		return $this->route ? $this->route : ($this->request ? $this->request->getRoute() : null);
// 		return $this->request->getRoute();
	}
456321
private function routing()
    {
        // import.
        $file = $this->app->getLoader()->findFirst($this->app->config('directory.config.routing') . DS . 'routes.yml');
        $this->router->import($file);

        // routing.
        $rule = $this->router->routing();
        $this->request->import($rule->getParams());

        // add action chain.
        $this->actionChain->addAction($rule->getController(), $rule->getAction());
    }
768678
public function getRoute(): ?RouteInterface
    {
        if (!is_null($this->getApp())) {
            return $this->getApp()->getService('routing')->getCurrentRoute();
        }

        return null;
    }
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;
    }
222824
public function currentRouteAction()
    {
        if (! is_null($route = $this->current())) {
            $action = $route->getAction();

            return isset($action['controller']) ? $action['controller'] : null;
        }
    }