allows iteration over all configured routes

@return  \Traversable
@since   6.1.0
429268
public function getIterator(): \Traversable
    {
        $routes = $this->routes;
        usort(
                $routes,
                function(Route $a, Route $b)
                {
                    return strnatcmp($a->configuredPath(), $b->configuredPath());
                }
        );
        return new \ArrayIterator($routes);
    }
225596
public function getAvailableDictionaryInformation(): \Traversable
    {
        $languages = $this->getContaoLanguages();

        foreach ($languages as $sourceLanguage) {
            foreach ($languages as $targetLanguage) {
                if ($sourceLanguage === $targetLanguage) {
                    continue;
                }
                foreach (array_keys($this->dictionaryMeta) as $dictionary) {
                    yield new DictionaryInformation($dictionary, $sourceLanguage, $targetLanguage);
                }

                yield new DictionaryInformation(static::ALL_TABLES, $sourceLanguage, $targetLanguage);
            }
        }
    }
1242197
public static function getRoutes()
    {
        if (empty(self::$routes)) {
            // If no routes have been set, try the standard file.
            if (is_readable(self::ROUTES_FILE_LOCATION)) {
                // Decode the JSON routes file into an array.
                self::$routes = json_decode(
                    file_get_contents(self::ROUTES_FILE_LOCATION),
                    true
                );
            }
            // No valid routes have been found.
            if (empty(self::$routes)) {
                throw new Exception('No routes could be obtained. Please check the route configuration file.');
            }
        }

        return self::$routes;
    }
660346
public function getIterator(): \Traversable
    {
        if ($this->data instanceof \ArrayIterator) {
            return $this->data;
        }

        if ($this->data instanceof \IteratorAggregate) {
            return $this->data->getIterator();
        }

        if (!\is_array($this->data)) {
            throw new NotIterableException('Cannot get iterator for data');
        }

        return new \ArrayIterator($this->data);
    }
153735
protected function getOriginalCursor(): Traversable
    {
        if ($this->ignoreCache) {
            return parent::getCursor();
        }

        if ($this->getLimit()) {
            $this->params[1]['limit'] = $this->getLimit() - $this->position;
        }

        $skipped = $this->params[1]['skip'] ?? 0;

        $this->skip($skipped + $this->position - 1);

        $this->ignoreCache = true;

        return $this->getOriginalCursor();
    }
450544
public function traversable()
    {
        $message   = ['%s is {{not|}} traversable', $this->value];
        $assertion = (is_array($this->value) || $this->value instanceof Traversable);
        $this->assert($assertion, $message);

        return $this;
    }
390848
public function getRoutes(): array
    {
        $routes = [];
        $this->each(function (Route $route) use (&$routes) {
            $routes[] = $route;
        });

        return $routes;
    }
1233479
public function getRouteMatch()
    {
        if (null === $this->routeMatch) {
            /** @noinspection PhpUndefinedMethodInspection */
            $this->routeMatch = $this->getEvent()->getRouteMatch();
        }

        return $this->routeMatch;
    }
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();

			});

		});

	}
393744
protected function findAvailableRoutes()
    {
        $routes = [];
        $rules = Director::config()->get('rules');

        foreach ($rules as $pattern => $controllerInfo) {
            $routeClass = (is_string($controllerInfo)) ? $controllerInfo : $controllerInfo['Controller'];

            try {
                $routeController = Injector::inst()->get($routeClass);
                if ($routeController instanceof Controller) {
                    $routes[] = $pattern;
                }
            } catch (InjectorNotFoundException $ex) {
            }

        }
        return $routes;
    }
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');
        });
    }
772938
public function links()
    {
        if (!is_array($this->links) && !($this->links instanceof \Traversable)) {
            $this->links = [];
        }

        foreach ($this->links as $link) {
            if (isset($link['active']) && !$link['active']) {
                continue;
            }

            if (isset($link['required_acl_permissions'])) {
                $link['permissions'] = $link['required_acl_permissions'];
                unset($link['required_acl_permissions']);
            }

            if (isset($link['permissions'])) {
                if ($this->hasPermissions($link['permissions']) === false) {
                    continue;
                }
            }

            yield $link;
        }
    }
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));
    }
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;
	}
950136
public function getIterator(): \Traversable
    {
        $result = [];
        foreach ($this->links as $link) {
            if (is_array($link)) {
                $result = array_merge($result, $link);
            } else {
                $result[] = $link;
            }
        }

        return new \ArrayIterator($result);
    }
561185
public function getTraverser()
    {
        if (!$this->traverser) {
            $this->traverser = new NodeTraverser;
            $this->traverser->addVisitor(new NameResolver);
            $this->traverser->addVisitor($this->getVisitor());
        }

        return $this->traverser;
    }
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;
    }