Get registered routes
@return array
549253
public static function getRegisteredRoutes()
    {
        if (self::$_routes === null) {
            self::$_routes = [];
            $manager = Configs::authManager();
            foreach ($manager->getPermissions() as $item) {
                if ($item->name[0] === Configs::instance()->routePrefix) {   ///[yii2-brainbase v0.4.4 (admin:fix# mdmsoft/yii2-admin multi app)]
                    self::$_routes[$item->name] = $item->name;
                }
            }
        }
        return self::$_routes;
    }
1272731
public function routes()
    {
        Route::get('countries/{id}', function ($id) {
            $request = request();
            return CountryStore::country($id, $request);
        })->name('country');

        Route::get('countries', function () {
            $request = request();
            return CountryStore::countries($request);
        })->name('countries');

        Route::get('administrative_areas/{id}', function ($id) {
            $request = request();
            return CountryStore::administrativeArea($id, $request);
        })->name('administrative_area');

        Route::get('cities/{city_id}', function ($city_id) {
                $request = request();
                return CountryStore::city($city_id, $request);
        })->name('city');
    }
845573
public function getFilters()
    {
        return array(
            'timeAgo' => new \Twig_Filter_Method($this, 'timeAgo'),
            'homeLink' => new \Twig_Filter_Method($this, 'homeLink'),
            'activeLink' => new \Twig_Filter_Method($this, 'activeLink'),
            'activeRoute' => new \Twig_Filter_Method($this, 'activeRoute'),
            'compareRoute' => new \Twig_Filter_Method($this, 'compareRoute'),
            'autoLink' => new \Twig_Filter_Method($this, 'autoLink')
        );
    }
1001840
protected function addRoutes()
    {
		return ["Route::delete('" . $this->routeName . "/arr-delete', '" . $this->controller . "@arrDelete')->name('" . $this->myAddrName . ".arrDelete');\nRoute::resource('" . $this->routeName . "', '" . $this->controller . "');"];
    }
490472
public function getAllRoutes()
    {
        $routes = Route::getRoutes();
        $results = [];

        if ($routes != null) {
            foreach ($routes as $route) {
                $route = array(
                    'method' => $route->getMethods(),
                    'uri'    => $route->getPath()
                );
                $results[] = (object)$route;
            }
        }

        return response()->json(arrayView('phpsoft.users::route/browse', [
            'routes' => $results,
        ]), 200);
    }
126280
private function get_route_parts() : array {
		$to = $this->routes[ $this->__method_name ]['to'];
		if ( \is_array( $to ) ) {
			$to_parts = $to;
		} else {
			$to_parts = explode( '@', $to );
		}

		$to_class  = $to_parts[0];
		$to_method = $to_parts[1];

		$on_error = null;
		if ( array_key_exists( 'on_error', $this->routes[ $this->__method_name ] ) ) {
			$on_error = $this->routes[ $this->__method_name ]['on_error'];
		}

		return [ $to_class, $to_method, $on_error ];
	}
991461
protected function getDefaultRoutes()
	{
	    $routes = [
	        //'/{controller}[/p/{params}]',
	        '/{controller}/{id}[.html]',   // for /article/12.html
	        '/{controller}',        // for /article.html
	    ];
	    
	    // root route for '/'
	    $hasRootRoute = false;
	    $patterns = $this->getRoutesPatterns();
	    foreach ($patterns as $pattern) {
	        if (strpos($pattern, '/[') === 0 || $pattern == '/') {
	            $hasRootRoute = true;
	            break;
	        }
	    }
	    
	    if (!$hasRootRoute) {
	        $routes['/'] = '/';
	    }
	    
	    return $routes;
	}
434464
protected function getRoutes()
    {
        $options = $this->getOptions();
        return isset($options[self::KEY_ROUTES]) ? $options[self::KEY_ROUTES] : array();
    }
915402
public function getAllRoutes()
    {
        $routes = [];
        foreach ($this->getRoutes() as $path => $route) {
            if (array_key_exists('slug', $route)) {
                $routes[$route['slug']] = $path;
            }
        }
        return $routes;
    }
192756
public function actionRemove(): array
    {
        $routes = Yii::$app->getRequest()->post('routes', []);
        $model = Yii::createObject($this->modelClass);
        $model->remove($routes);

        return $model->getAvailableAndAssignedRoutes();
    }
630807
protected function getRoutes()
    {
        $routes = [];
        foreach ($this->routes as $collection) {
            foreach ($collection->getRoutes() as $route) {
                $uses = array_key_exists('uses', $route->getAction())
                    ? $route->getAction()['uses']
                    : $route->getActionName();

                $routes[] = $this->filterRoute([
                    'host' => $route->domain(),
                    'method' => implode('|', $route->methods()),
                    'uri' => $route->uri(),
                    'name' => $route->getName(),
                    'action' => $uses,
                    'middleware' => $route->getMiddleware() ? implode(", ", $route->getMiddleware()) : "No",
                    'protected' => $route->isProtected() ? 'Yes' : 'No',
                    'versions' => implode(', ', $route->versions()),
                    'scopes' => implode(', ', $route->scopes()),
                    'rate' => $this->routeRateLimit($route),
                ]);
            }
        }

        if ($sort = $this->option('sort')) {
            $routes = Arr::sort($routes, function ($value) use ($sort) {
                return $value[$sort];
            });
        }
        if ($this->option('short')) {
            $this->headers = ['Method', 'URI', 'Name', 'Version(s)'];
            $routes = array_map(function ($item) {
                return array_only($item, ['method', 'uri', 'name', 'versions']);
            }, $routes);
        }
        return array_filter(array_unique($routes, SORT_REGULAR));
    }
997226
protected function getRoutes(): array
    {
        uasort($this->routes, function (RouteInterface $left, RouteInterface $right) {
            if ($left instanceof GroupRoute || $right instanceof GroupRoute) {
                return 1;
            }

            return 0;
        });

        return $this->routes;
    }
1071982
protected function getRoutes()
    {
        if (0 === count($this->routes)) {
            return $this->router->getRouteCollection()->all();
        }

        $routes = [];
        foreach ($this->routes as $name) {
            $route = $this->router->getRouteCollection()->get($name);
            if (null !== $route) {
                $routes[$name] = $route;
            }
        }

        return $routes;
    }
269203
private function registerRoutes()
    {
        collect(($routes = $this->getRoutes()))->each(function ($route) {
            $this->registerRoute($route);
        });

        $this->registerResourcesRoutes();
    }
928651
public function backendRoutes()
    {
        $path = $this->basePath() . '/routes/backend';
        if($this->isActive && file_exists($path)) {
            return File::files($path);
        }
        return [];
    }
1374642
public function getRoutes()
    {

        $manager = Configs::authManager();

        ///[yii2-brainbase v0.3.0 (admin:rbac):fix Added multi app (frontend/backend)]@see https://github.com/mdmsoft/yii2-admin/pull/309/
        // Get advanced configuration
        $advanced = Configs::instance()->advanced;
        if ($advanced) {
            // Use advanced route scheme.
            // Set advanced route prefix.
            $this->_routePrefix = self::PREFIX_ADVANCED;

            // Create empty routes array.
            $routes = [];

            // Step through each configured application
            foreach ($advanced as $id => $configPaths) {

                ///[2.6.7 (CHG# advanced, \yongtiger\application\Application::remoteAppConfigs)]
                Application::remoteAppCall($id, function ($app) use (&$routes, $id)  {
                    // Prepend the app id to all routes.
                    foreach ($this->getAppRoutes($app) as $route) {
                        // Force correct id string.
                        $id = $this->routePrefix . ltrim(trim($id), $this->routePrefix);
                        $routes[$id . $route] = $id . $route;
                    }
                }, function ($config) {
                    unset($config['bootstrap']);    ///[yii2-brainbase v0.3.0 (admin:rbac):fix Yii debug disappear in route]
                    return $config;
                });

            }
        } else {
            // Use basic route scheme.
            // Set basic route prefix
            $this->_routePrefix = self::PREFIX_BASIC;

            // Get basic app routes.
            $routes = $this->getAppRoutes();
        }
        ///[http://www.brainbook.cc]

        $exists = [];
        foreach (array_keys($manager->getPermissions()) as $name) {

            // if ($name[0] !== '/') {
            if ($name[0] !== $this->routePrefix) {  ///[yii2-brainbase v0.3.0 (admin:rbac):fix Added multi app (frontend/backend)]@see https://github.com/mdmsoft/yii2-admin/pull/309/
                continue;
            }

            $exists[] = $name;
            unset($routes[$name]);
        }
        return [
            'available' => array_keys($routes),
            'assigned' => $exists,
        ];
    }
1319119
public function getList()
    {
        $routes = &gplcart_static('route.list');

        if (isset($routes)) {
            return $routes;
        }

        $routes = (array) gplcart_config_get(GC_FILE_CONFIG_ROUTE);
        $this->hook->attach('route.list', $routes, $this);
        return $routes;
    }