src/Routing/Router.php
public function getRoutes($version = null)
    {
        $routes = $this->adapter->getIterableRoutes($version);

        if (! is_null($version)) {
            $routes = [$version => $routes];
        }

        $collections = [];

        foreach ($routes as $key => $value) {
            $collections[$key] = new RouteCollection($this->container['request']);

            foreach ($value as $route) {
                $route = $this->createRoute($route);

                $collections[$key]->add($route);
            }
        }

        return is_null($version) ? $collections : $collections[$version];
    }
public function getRoutes($version = null)
    {
        $routes = $this->adapter->getIterableRoutes($version);

        if (! is_null($version)) {
            $routes = [$version => $routes];
        }

        $collections = [];

        foreach ($routes as $key => $value) {
            $collections[$key] = new RouteCollection($this->container['request']);

            foreach ($value as $route) {
                $route = $this->createRoute($route);

                $collections[$key]->add($route);
            }
        }

        return is_null($version) ? $collections : $collections[$version];
    }
public function getRoutes ( $ version = null ) { $ routes = $ this -> adapter -> getIterableRoutes ( $ version ) ; if ( ! is_null ( $ version ) ) { $ routes = [ $ version => $ routes ] ; } $ collections = [ ] ; foreach ( $ routes as $ key => $ value ) { $ collections [ $ key ] = new RouteCollection ( $ this -> container [ 'request' ] ) ; foreach ( $ value as $ route ) { $ route = $ this -> createRoute ( $ route ) ; $ collections [ $ key ] -> add ( $ route ) ; } } return is_null ( $ version ) ? $ collections : $ collections [ $ version ] ; }
Get all routes registered on the adapter.

@param string $version

@return mixed
Get all routes registered on the adapter .