Returns the array of routes.
@return array The array of routes.
434464
protected function getRoutes()
    {
        $options = $this->getOptions();
        return isset($options[self::KEY_ROUTES]) ? $options[self::KEY_ROUTES] : array();
    }
683324
public static function getCurrentUrlArray()
    {
        $request = Router::getRequest();

        return [
            'plugin' => $request->params['plugin'],
            'controller' => $request->params['controller'],
            'action' => $request->params['action']
        ];
    }
183138
public function getRoutingResourcesPaths()
    {
        $ds = DIRECTORY_SEPARATOR;
        $path = $this->getPath().$ds.'Resources'.$ds.'config'.$ds.'routing.yml';

        if (file_exists($path)) {
            return [$path];
        }

        return [];
    }
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;
    }
119698
public function toArray()
	{
		return
			[
				"id" => $this->id,
				"name" => $this->name,
				"title" => $this->title,
				"route" => $this->route,
				"support" => $this->support,
				"version" => $this->version,
				"data" => $this->data,
				"key" => $this->key,
				"name_space" => $this->name_space,
				"path" => $this->path,
			];
	}
621536
protected function getRoutes()
    {
        $c = parent::ROUTE_PATTERN_CONTROLLER;
        $a = parent::ROUTE_PATTERN_ACTION;
        $v1 = self::ROUTE_PATTERN_VERSION_ONE;
        $v2 = self::ROUTE_PATTERN_VERSION_TWO;
        $v3 = self::ROUTE_PATTERN_VERSION_THREE;
        $o = self::ROUTE_PATTERN_OBJECT_ID;
        return array(
            "/$v1/$c" => self::MATCHES_CONTROLLER,
            "/$v1/$c/" => self::MATCHES_CONTROLLER,
            "/$v2/$c" => self::MATCHES_CONTROLLER,
            "/$v2/$c/" => self::MATCHES_CONTROLLER,
            "/$v3/$c" => self::MATCHES_CONTROLLER,
            "/$v3/$c/" => self::MATCHES_CONTROLLER,
            "/$v1/$c/$a" => self::MATCHES_CONTROLLER_AND_ACTION,
            "/$v1/$c/$a/" => self::MATCHES_CONTROLLER_AND_ACTION,
            "/$v2/$c/$a" => self::MATCHES_CONTROLLER_AND_ACTION,
            "/$v2/$c/$a/" => self::MATCHES_CONTROLLER_AND_ACTION,
            "/$v3/$c/$a" => self::MATCHES_CONTROLLER_AND_ACTION,
            "/$v3/$c/$a/" => self::MATCHES_CONTROLLER_AND_ACTION,
            "/$v1/$c/$o" => self::MATCHES_CONTROLLER_AND_ID,
            "/$v1/$c/$o/" => self::MATCHES_CONTROLLER_AND_ID,
            "/$v2/$c/$o" => self::MATCHES_CONTROLLER_AND_ID,
            "/$v2/$c/$o/" => self::MATCHES_CONTROLLER_AND_ID,
            "/$v3/$c/$o" => self::MATCHES_CONTROLLER_AND_ID,
            "/$v3/$c/$o/" => self::MATCHES_CONTROLLER_AND_ID,
            "/$v1/$c/$a/$o" => self::MATCHES_CONTROLLER_ACTION_AND_ID,
            "/$v1/$c/$a/$o/" => self::MATCHES_CONTROLLER_ACTION_AND_ID,
            "/$v1/$c/$o/$a" => self::MATCHES_CONTROLLER_ACTION_AND_ID,
            "/$v1/$c/$o/$a/" => self::MATCHES_CONTROLLER_ACTION_AND_ID,
            "/$v2/$c/$a/$o" => self::MATCHES_CONTROLLER_ACTION_AND_ID,
            "/$v2/$c/$a/$o/" => self::MATCHES_CONTROLLER_ACTION_AND_ID,
            "/$v2/$c/$o/$a" => self::MATCHES_CONTROLLER_ACTION_AND_ID,
            "/$v2/$c/$o/$a/" => self::MATCHES_CONTROLLER_ACTION_AND_ID,
            "/$v3/$c/$a/$o" => self::MATCHES_CONTROLLER_ACTION_AND_ID,
            "/$v3/$c/$a/$o/" => self::MATCHES_CONTROLLER_ACTION_AND_ID,
            "/$v3/$c/$o/$a" => self::MATCHES_CONTROLLER_ACTION_AND_ID,
            "/$v3/$c/$o/$a/" => self::MATCHES_CONTROLLER_ACTION_AND_ID,
        );
    }
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));
    }
1290839
protected function retrieveRoutes()
    {
        $routes = null;

        // 1st of all we'll try to fetch routes from cache if enabled
        if (true === $this->isCacheEnabled()) {

            try {
                $routes = $this->restore($this->getUuid(), $this->getScope());

            } catch (Doozr_Cache_Service_Exception $e) {
                $routes = null;
            }
        }

        // If cache either disabled or routes could not be fetched -> retrieve them right now ...
        if (null === $routes) {
            $routesFromPresenters    = $this->getRoutesFromPresenters();
            $routesFromConfiguration = $this->getRoutesFromConfiguration(
                (array) $this->getRegistry()->getConfiguration()->kernel->transmission->routing->routes
            );

            $routes = array_merge_recursive($routesFromPresenters, $routesFromConfiguration);

            // Cache if enabled ...
            if (true === $this->getCacheEnabled()) {
                $this->store($routes);
            }
        }

        // Return routes either from cache or fresh retrieved ...
        return $routes;
    }
1207469
public function getRoutes()
    {
        $results = array();

        foreach ($this->routes as $route) {
            if ($route->getActionName() != 'Closure') {
                $results[] = $this->getRouteInformation($route);
            }
        }

        return Collection::make(array_filter($results));
    }
697235
public function getRoutes()
    {
        $manager = RBACHelper::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
        ];
    }
145947
public function routes()
    {
        if (empty($this->routes))
        {
            $this->routes = $this->configureSlice()->asArray();
        }

        return $this->routes;
    }
535731
public function getRoutesPatterns()
	{
		$patterns = [];
		$rows = $this->getRoutes();
		if ($rows) foreach ($rows as $route) {
		    $patterns[] = $route->getPattern();
		}
		return $patterns;
	}
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;
    }
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);
    }
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
        ];
    }
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;
	}
767017
public function loadRoutes()
    {
        $routesJsonFile = $this->configDir . '/routes.json';
        $routesPhpFile = $this->configDir . '/routes.php';
        
        if (file_exists($this->resourcesDir) && file_exists($this->configDir)) {
            if (file_exists($routesJsonFile))
                return json_decode(file_get_contents($routesJsonFile), true);
            elseif (file_exists($routesPhpFile))
                return require_once $routesPhpFile;
        } else {
            return array();
        }
    }