src/main/php/routing/Routes.php
public function getIterator(): \Traversable
    {
        $routes = $this->routes;
        usort(
                $routes,
                function(Route $a, Route $b)
                {
                    return strnatcmp($a->configuredPath(), $b->configuredPath());
                }
        );
        return new \ArrayIterator($routes);
    }
public function getIterator(): \Traversable
    {
        $routes = $this->routes;
        usort(
                $routes,
                function(Route $a, Route $b)
                {
                    return strnatcmp($a->configuredPath(), $b->configuredPath());
                }
        );
        return new \ArrayIterator($routes);
    }
public function getIterator ( ) : \ Traversable { $ routes = $ this -> routes ; usort ( $ routes , function ( Route $ a , Route $ b ) { return strnatcmp ( $ a -> configuredPath ( ) , $ b -> configuredPath ( ) ) ; } ) ; return new \ ArrayIterator ( $ routes ) ; }
allows iteration over all configured routes

@return  \Traversable
@since   6.1.0
allows iteration over all configured routes