public function format(array $resources)
    {
        $this->routes = [];

        foreach ($resources as $resource) {
            $this->routes[$resource->getType() . ' ' . $resource->getUri()] = [
                'path' => $resource->getUri(),
                'type' => $resource->getType(),
                'method' => $resource->getMethod(),
            ];
        }

        return $resources;
    }
public function format(array $resources)
    {
        $this->routes = [];

        foreach ($resources as $resource) {
            $this->routes[$resource->getType() . ' ' . $resource->getUri()] = [
                'path' => $resource->getUri(),
                'type' => $resource->getType(),
                'method' => $resource->getMethod(),
            ];
        }

        return $resources;
    }
public function format ( array $ resources ) { $ this -> routes = [ ] ; foreach ( $ resources as $ resource ) { $ this -> routes [ $ resource -> getType ( ) . ' ' . $ resource -> getUri ( ) ] = [ 'path' => $ resource -> getUri ( ) , 'type' => $ resource -> getType ( ) , 'method' => $ resource -> getMethod ( ) , ] ; } return $ resources ; }
Format an array of basic routes into an array of arrays

@param BasicRoute[] $resources

@return BasicRoute[]
Format an array of basic routes into an array of arrays