Get saved routes.
@return array
974744
public static function getSavedRoutes()
    {
        $result = [];
        foreach (Yii::$app->getAuthManager()->getPermissions() as $name => $value) {
            if ($name[0] === '/' && substr($name, -1) != '*') {
                $result[] = $name;
            }
        }

        return $result;
    }
970068
protected function loadAdminRouteData() {
    if (!isset($this->adminRoutesData)) {
      $this->adminRoutesData = $this->environment->getStorage()->retrieve('admin_routes');
    }

    return $this->adminRoutesData;
  }
1372258
public function getRouteUrls()
    {
        $routes = [];
        if (isset($this->data['_links']['pf:routes'])) {
            foreach ($this->data['_links']['pf:routes'] as $route) {
                $routes[] = $route['href'];
            }
        }

        return $routes;
    }
1049065
public function getRoutes() : array {
        $request = get_request();
        $requestMethod = $request->method();
        $requestPathParts = $request->pathParts();
        $routesIndex = $this->routesIndex;
        $routes = [];
        $this->getRoutesFromIndex($routes,$routesIndex, $requestMethod, $requestPathParts);
        return $routes;
    }
998082
public function collectRoutes()
    {
        $routes = [];

        foreach($this->getCollectors() as $collector) {
            $routes = array_merge($routes, $collector->collectRoutes());
        }

        return $routes;
    }
756389
public function detectRoutes()
    {
        $components = $this->detectUiComponents();

        $return = [];
        foreach ($components as $component) {
            $name      = $this->files->name($component);
            $namespace = $this->resolveUIComponentNamespace($this->files->get($component));
            $return[]  = $namespace . '\\' . $name;
        }
        return new Collection($return);
    }
1262296
protected function getPrefixes()
    {
        $router = app(\Illuminate\Routing\Router::class);

        $this->prefixes = collect(
            explode('/', $router->getCurrentRoute()->getPrefix())
        );

        // Remove the last prefix if it matches the controller.
        $this->prefixes = $this->removeControllerFromPrefixes($this->prefixes)->filter();

        if ($this->prefixes->count() > 0) {
            $this->prefix = $this->prefixes->filter()->implode('.');
        }
    }
42802
public function getRoutes()
    {
        $list = array();

        foreach (glob(__DIR__ . '/config/commands/*.php') as $file) {

            $command = pathinfo($file, PATHINFO_FILENAME);
            $list[$command] = gplcart_config_get($file);

            $method = $command;
            $parts = explode('-', $command);

            if (count($parts) > 1) {
                $method = array_pop($parts);
            }

            $class_name = implode('', $parts);

            $list[$command]['handlers']['controller'] = array(
                "gplcart\\modules\\cli\\controllers\\commands\\$class_name", "cmd$method$class_name");
        }

        return $list;
    }
178158
public function getServiceRoutingMap()
    {
        $ret = [];
        $optionRoutes = $this->getOptionRoutes();

        foreach ($optionRoutes as $routeName => $optionRoute) {
            // get base name from options action
            $routeParts = explode('.', $routeName);
            if (count($routeParts) < 3) {
                continue;
            }
            array_pop($routeParts); // get rid of last part
            $baseName = implode('.', $routeParts);

            // get routes from same controller
            foreach ($this->getRoutesByBasename($baseName) as $routeName => $route) {
                // don't put schema stuff
                if (strpos('schema', strtolower($routeName)) === false) {
                    $ret[$baseName][$routeName] = $route;
                }
            }
        }

        return $ret;
    }
618777
public function getOptionRoutes()
    {
        $cached = $this->cacheProvider->fetch('cached_restutils_route_options');
        if ($cached) {
            return $cached;
        }
        $ret = array_filter(
            $this->router->getRouteCollection()->all(),
            function ($route) {
                if (!in_array('OPTIONS', $route->getMethods())) {
                    return false;
                }
                // ignore all schema routes
                if (strpos($route->getPath(), '/schema') === 0) {
                    return false;
                }
                if ($route->getPath() == '/' || $route->getPath() == '/core/version') {
                    return false;
                }

                return is_null($route->getRequirement('id'));
            }
        );
        $this->cacheProvider->save('cached_restutils_route_options', $ret);
        return $ret;
    }
434464
protected function getRoutes()
    {
        $options = $this->getOptions();
        return isset($options[self::KEY_ROUTES]) ? $options[self::KEY_ROUTES] : array();
    }
499633
private function getRouteRoles()
    {
        $router = $this->router;

        $cache = $this->getConfigCacheFactory()->cache(
            $this->options['cache_dir'].'/tenside_roles.php',
            function (ConfigCacheInterface $cache) use ($router) {
                $routes = $router->getRouteCollection();
                $roles  = [];
                foreach ($routes as $name => $route) {
                    if ($requiredRole = $route->getOption('required_role')) {
                        $roles[$name] = $requiredRole;
                    }
                }

                $cache->write('<?php return ' . var_export($roles, true) . ';', $routes->getResources());
            }
        );

        return require_once $cache->getPath();
    }
386962
public function getRoutes()
    {
        $manager = Yii::$app->getAuthManager();
        $routes = $this->getAppRoutes();
        $exists = [];
        foreach (array_keys($manager->getPermissions()) as $name) {
            if ($name[0] !== '/') {
                continue;
            }
            $exists[] = $name;
            unset($routes[$name]);
        }
        return [
            'avaliable' => array_keys($routes),
            'assigned' => $exists
        ];
    }
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;
	}
535731
public function getRoutesPatterns()
	{
		$patterns = [];
		$rows = $this->getRoutes();
		if ($rows) foreach ($rows as $route) {
		    $patterns[] = $route->getPattern();
		}
		return $patterns;
	}
915402
public function getAllRoutes()
    {
        $routes = [];
        foreach ($this->getRoutes() as $path => $route) {
            if (array_key_exists('slug', $route)) {
                $routes[$route['slug']] = $path;
            }
        }
        return $routes;
    }
860969
protected function getRoutes()
    {
        $results = array();

        foreach($this->routes as $route) {
            $results[] = $this->getRouteInformation($route);
        }

        return array_filter($results);
    }