Gets list of candidate Route objects for request

@return array    List of Route objects
763193
public function getCandidates()
    {
        $candidates = array();

        foreach ($this->collection->all() as $name => $route) {
            $specs = array();

            preg_match_all('/\{\w+\}/', $route->getPath(), $matches);

            if (isset($matches[0])) {
                $specs = $matches[0];
            }

            foreach ($specs as $spec) {
                $param          = substr($spec, 1, -1);
                $regexSpec      = '\\'.$spec.'\\';
                $requirements   = $route->getRequirements();

                if (isset($requirements[$param])) {
                    $route->setRegex(

                        str_replace(
                            $spec,
                            $this->getRegexOperand($requirements[$param]),
                            $route->getRegex()
                        )
                    );
                }
            }

            // Build regeular expression to match routes
            $route->setRegex('^'.'/'.ltrim(trim($route->getRegex()), '/').'/?$');
            $route->setRegex('/'.str_replace('/', '\/', $route->getRegex()).'/');

            if (preg_match($route->getRegex(), $this->request->getPathInfo())) {
                // We have a match
                $candidates[] = $route;
            }
        }

        return $candidates;
    }
752946
public function getRoutes()
    {
        $routes = array(
            'ezpListAtom' => new ezpRestVersionedRoute(
                new ezpMvcRailsRoute(
                    '/content/node/:nodeId/listAtom', 'ezpRestAtomController',
                    array( 'http-get' => 'collection' )
                ), 1
            ),
            // @TODO : Make possible to interchange optional params positions
            'ezpList' => new ezpRestVersionedRoute(
                new ezpMvcRegexpRoute(
                    '@^/content/node/(?P<nodeId>\d+)/list(?:/offset/(?P<offset>\d+))?(?:/limit/(?P<limit>\d+))?(?:/sort/(?P<sortKey>\w+)(?:/(?P<sortType>asc|desc))?)?$@',
                    'ezpRestContentController', array( 'http-get' => 'list' )
                ),
                1
            ),
            'ezpNode' => new ezpRestVersionedRoute(
                new ezpMvcRailsRoute(
                    '/content/node/:nodeId', 'ezpRestContentController',
                    array( 'http-get' => 'viewContent' )
                ),
                1
            ),
            'ezpFieldsByNode' => new ezpRestVersionedRoute(
                new ezpMvcRailsRoute(
                    '/content/node/:nodeId/fields', 'ezpRestContentController',
                    array( 'http-get' => 'viewFields' )
                ),
                1
            ),
            'ezpFieldByNode' => new ezpRestVersionedRoute(
                new ezpMvcRailsRoute(
                    '/content/node/:nodeId/field/:fieldIdentifier',
                    'ezpRestContentController',
                    array( 'http-get' => 'viewField' )
                ),
                1
            ),
            'ezpChildrenCount' => new ezpRestVersionedRoute(
                new ezpMvcRailsRoute(
                    '/content/node/:nodeId/childrenCount',
                    'ezpRestContentController',
                    array( 'http-get' => 'countChildren' )
                ),
                1
            ),
            'ezpObject' => new ezpRestVersionedRoute(
                new ezpMvcRailsRoute(
                    '/content/object/:objectId', 'ezpRestContentController',
                    array( 'http-get' => 'viewContent' )
                ),
                1
            ),
            'ezpFieldsByObject' => new ezpRestVersionedRoute(
                new ezpMvcRailsRoute(
                    '/content/object/:objectId/fields',
                    'ezpRestContentController',
                    array( 'http-get' => 'viewFields' )
                ),
                1
            ),
            'ezpFieldByObject' => new ezpRestVersionedRoute(
                new ezpMvcRailsRoute(
                    '/content/object/:objectId/field/:fieldIdentifier',
                    'ezpRestContentController',
                    array( 'http-get' => 'viewField' )
                ),
                1
            )
        );
        return $routes;
    }
124661
private function route_request() {
		$named_arguments = $this->get_named_arguments();

		list( $to_class, $to_method, $on_error ) = $this->get_route_parts();

		return $this->do_route( $to_class, $to_method, $named_arguments, $on_error );
	}
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;
    }
1191672
public function findRoutes(): array
    {
        /** @var array[] $routes */
        $routes = [];

        $modules = $this->packageRepository->findModules();
        foreach ($modules as $module) {
            $extra = $module->getExtra();
            $this->validateRoutesSectionInExtra($extra);
            if (empty($extra['phplist/core']['routes'])) {
                continue;
            }

            /** @var array $moduleRoutes */
            $moduleRoutes = $extra['phplist/core']['routes'];
            foreach ($moduleRoutes as $name => $route) {
                $prefixedRouteName = $module->getName() . '.' . $name;
                $routes[$prefixedRouteName] = $route;
            }
        }

        return $routes;
    }
962880
protected function findRoute(Request $request)
    {
        if (! in_array($request->method(), array('GET', 'HEAD', 'OPTIONS'))) {
            return;
        }

        $uri = $request->path();

        foreach ($this->routes as $pattern => $callback) {
            if (preg_match('#^' .$pattern .'$#s', $uri, $matches)) {
                return array($callback, array_slice($matches, 1));
            }
        }
    }
681638
private function getRouteFolders()
    {
        $rotas = \Config\Config::getViewPermissoes();
        $libsPath[] = [DOMINIO => "public/{$this->directory}"];
        if (!empty($_SESSION['userlogin'])) {
            $libsPath[][DOMINIO] = "public/{$this->directory}/{$_SESSION['userlogin']['setor']}";
            $libsPath = array_merge($libsPath, array_map(function ($class) {
                return [$class => VENDOR . $class . "/public/{$this->directory}/{$_SESSION['userlogin']['setor']}"];
            }, $rotas));
        }
        $libsPath = array_merge($libsPath, array_map(function ($class) {
            return [$class => VENDOR . $class . "/public/{$this->directory}"];
        }, $rotas));

        return $libsPath;
    }
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;
    }
995623
public function getList()
    {
        $routeMatch = $this->getEvent()->getRouteMatch();
        
        $type = $this->params('type', false);
        
        $alerts = $this->getAlertDataHandler()->getAlertsStructure($type);
        $response = $this->getResponse();
        $response->getHeaders()->addHeaderLine('Content-Type', 'application/json');
        $serializer = $this->getSerializer();
        $alertssJson = $serializer->serialize($alerts, 'json');
        $response->setContent($alertssJson);
        return $response;
    }
1169739
public function getRoutes() : Array {

		$return = array();
		foreach($this->routes as $route) {
			array_push($return, [$route->getPath(), $route->getMethod()]);
		}
		return $return;

	}
249774
public function getOptions(Request $request)
    {
        $routes = [];

        foreach ($this->routes as $route) {
            if ($route->matchesPattern($request)) {
                $routes[] = $route;
            }
        }

        return $routes;
    }
183138
public function getRoutingResourcesPaths()
    {
        $ds = DIRECTORY_SEPARATOR;
        $path = $this->getPath().$ds.'Resources'.$ds.'config'.$ds.'routing.yml';

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

        return [];
    }
1132126
public function routes()
    {
        $routes = $this->app->make('routes.collection')->getAll();

        $headers = ['Condition', 'Filter', 'Action', 'Parameters', 'Pattern', 'Guid'];

        $dataset = array_map(function ($route) {
            return [
                $route->getCondition(),
                $route->getFilter(),
                $route->getAction(),
                $route->getParameters(),
                $route->getPattern(),
                $route->getGuid(),
            ];
        }, $routes);

        $this->table($headers, $dataset);
    }
414083
protected function gatherRouteMiddleware($request)
    {
        if (! is_null($route = $request->route())) {
            return $this->router->gatherRouteMiddleware($route);
        }

        return array();
    }
1184387
public static function ApiRoutes(){
        Route::group(['prefix' => 'geo'], function(){
            Route::get('search/{name}/{parent_id?}',    '\Igaster\LaravelCities\GeoController@search');
            Route::get('item/{id}',         '\Igaster\LaravelCities\GeoController@item');
            Route::get('items/{ids}',       '\Igaster\LaravelCities\GeoController@items');
            Route::get('children/{id}',     '\Igaster\LaravelCities\GeoController@children');
            Route::get('parent/{id}',       '\Igaster\LaravelCities\GeoController@parent');
            Route::get('country/{code}',    '\Igaster\LaravelCities\GeoController@country');
            Route::get('countries',         '\Igaster\LaravelCities\GeoController@countries');
        });
    }
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;
	}
390848
public function getRoutes(): array
    {
        $routes = [];
        $this->each(function (Route $route) use (&$routes) {
            $routes[] = $route;
        });

        return $routes;
    }