Display the routes in console
@return bool
164890
public function displayRoutes()
    {
        $headers = ['Method', 'URI', 'Name', 'Action', 'Middleware', 'Map To'];
        $this->generateRoutes();
        $this->applyFilters();
        if (!$this->routes) {
            $this->warn('No routes found!');
            return false;
        }
        //change the reverse order if command contains reverse command
        $str = '';
        if ($this->option('reverse')) {
            rsort($this->routes);
            $str = '. Displayed in reverse order';
        }
        $this->info("Route found: " . count($this->routes) . $str);
        $this->table($headers, $this->routes);
    }
944206
public static function route() {
		if(defined('DACHI_CLI'))
			return false;

		$uri = Request::getFullUri();
		$route = self::findRoute($uri);
		self::performRoute($route);

		return Template::render();
	}
637052
public function is()
	{
		$this->routes = array(); 

		foreach(func_get_args() as $param)
		{
			if(!is_array($param))
			{
				$this->routes[] = $param;
				continue;
			}

			foreach ($param as $p) 
			{
				$this->routes[] = $p;
			}
		}

		$this->request = Request::path();

		$this->parseRoutes();

		foreach($this->routes as $route)
		{
			if(!Request::is($route))
			{
				continue;
			}

			foreach($this->bad_routes as $bad_route)
			{
				if(str_is($bad_route, $this->request))
				{
					return false;
				}
			}

			return true;		
		}

		return false;
	}
488440
public function main()
    {
        $output = [
            ['Route name', 'URI template', 'Defaults']
        ];
        foreach (Router::routes() as $route) {
            $name = isset($route->options['_name']) ? $route->options['_name'] : $route->getName();
            ksort($route->defaults);
            $output[] = [$name, $route->template, json_encode($route->defaults)];
        }
        $this->helper('table')->output($output);
        $this->out();
    }
492818
private function routes()
    {
        if (Configuration::read('routing.config.enable') === true) {
            $routingConfigPath = $this->configDir . DS . Configuration::read('routing.config.file');
            if (file_exists($routingConfigPath)) {
                require $routingConfigPath;
                return true;
            } else {
                throw new \Exception('Routing configuration file "' . $routingConfigPath . '" doesn\' exist.');
            }
        }
        return false;
    }
731402
public function Index() {
      $this->Permission('Garden.Settings.Manage');
      $this->AddSideMenu('dashboard/routes');
      $this->AddJsFile('routes.js');
      $this->Title(T('Routes'));
      
      $this->MyRoutes = Gdn::Router()->Routes;
      $this->Render();
   }
1134101
public function routes()
	{
		Route::group(array('prefix' => $this->config->get('coanda::coanda.admin_path')), function()
		{
			// All module admin routes should be wrapper in the auth filter
			Route::group(array('before' => 'admin_auth'), function()
			{
				foreach ($this->modules as $module)
				{
					$module->adminRoutes();
				}
			});

			// We will put the main admin controller outside the group so it can handle its own filters
			Route::controller('/', 'CoandaCMS\Coanda\Controllers\AdminController');

		});

		// Let the module output any front end 'user' routes
		foreach ($this->modules as $module)
		{
			$module->userRoutes();
		}

		App::before( function () {

			Route::match(['GET', 'POST'], 'search', function () {
				
				// Pass this route to the search provider, it can do whatever it likes!
				return Coanda::search()->handleSearch();

			});

			Route::match(['GET', 'POST'], '{slug}', function ($slug)
			{
				return Coanda::route($slug);

			})->where('slug', '[\.\/_\-\_A-Za-z0-9]+');

			Route::match(['GET', 'POST'], '/', function ()
			{
				return Coanda::routeHome();

			});

		});

	}
731165
public function active()
    {
        $uri_path = rtrim(urldecode(Grav::instance()['uri']->path()), '/') ?: '/';
        $routes = Grav::instance()['pages']->routes();

        return isset($routes[$uri_path]) && $routes[$uri_path] === $this->path();
    }
228917
public function detectControllerName()
    {
        $pattern = '#/'.$this->controllerNameRegex().'#i';
        if (!preg_match($pattern, $this->path, $matches)) {
            return false;
        }

        return $matches[1];
    }
480706
protected function getFreshApplicationRoutes()
	{
		$app = require $this->laravel->basePath().'/bootstrap/app.php';

		$app->make('Illuminate\Contracts\Console\Kernel')->bootstrap();

		return $app['router']->getRoutes();
	}
1242997
public function indexUrl()
    {
        $route = 'admin::edit-menu';
        if (Route::has($route)) {
            return route($route, $this->menu_id);
        }

        return route('dashboard');
    }
1079104
protected function getRoutes()
    {
        $c = self::ROUTE_PATTERN_CONTROLLER;
        $a = self::ROUTE_PATTERN_ACTION;
        $p = self::ROUTE_PATTERN_PARAMS;
        return array(
            "/" => self::MATCHES_NOTHING,
            "/$c" => self::MATCHES_CONTROLLER,
            "/$c/" => self::MATCHES_CONTROLLER,
            "/$c/$a" => self::MATCHES_CONTROLLER_AND_ACTION,
            "/$c/$a/" => self::MATCHES_CONTROLLER_AND_ACTION,
            "/$c/$a/$p" => self::MATCHES_CONTROLLER_ACTION_AND_PARAMS
        );
    }
995517
public function getRoutes()
    {
        $out = [];
        foreach($this->routes as $route) {
            $out[] = $route;
        }

        foreach ($this->children as $child) {
            foreach ($child->getRoutes() as $route) {
                $out[] = $route;
            }
        }

        return $out;
    }
1134468
protected function doExecute()
    {
        $paths = $this->getArgument(0);

        $paths = Arr::toArray($paths);

        if ($paths === []) {
            $p = $this->getOption('p');

            $dir = ConsoleHelper::getAllPackagesResolver()->getPackage($p)->getDir();

            $paths = [
                $dir . '/routing.yml',
                $dir . '/Resources/routing/**/*.yml'
            ];
        }

        $files = [];

        foreach ($paths as $path) {
            $files[] = \Windwalker\glob($path);
        }

        $files = array_merge(...$files);

        foreach ($files as $file) {
            $this->convert($file);
        }

        return true;
    }
804470
public function is()
    {
        $patterns = func_get_args();

        $name = $this->currentRouteName();

        foreach ($patterns as $pattern) {
            if (Str::is($pattern, $this->currentRouteName())) {
                return true;
            }
        }

        return false;
    }
315663
public function checkPaths(): self
    {
        if (empty($this->options['rootDir'])) {
            $this->options['rootDir'] .= '/';
        } else {
            $rootDirPosLastChar = strlen($this->options['rootDir']) - 1;
            
            if ($this->options['rootDir'][$rootDirPosLastChar] !== '/') {
                $this->options['rootDir'] .= '/';
            }
        }
        
        if (empty($this->options['vendorDir'])) {
            $this->options['vendorDir'] .= '/';
        } else {
            $vendorDirPosLastChar = strlen($this->options['vendorDir']) - 1;
            
            if ($this->options['vendorDir'][$vendorDirPosLastChar] !== '/') {
                $this->options['vendorDir'] .= '/';
            }
        }
        
        return $this;
    }
713862
protected function registerRoutes()
    {
        $this->get($this['imagine.thumbnail_url'] . '{size}/{checksum}/{path}', function (Application $app, Request $request, $path, $size, $checksum) { return $app['controllers.imagine']->resizeImageAction($request, $path, $size, $checksum); })->assert('path', '.+');
        $this->get('', function (Application $app, Request $request) { return $app['controllers.page']->showHomePageAction($request); });
        $this->error(function (NotFoundHttpException $e, $code) { return $this['controllers.error']->notFoundAction($e); });
        $this->error(function (\Exception $e, $code) { return $this['controllers.error']->internalServerErrorAction($e); });
    }