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;
    }
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;
    }
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 ; }
Return a flat list of routes
@return Route[]
Return a flat list of routes