public function findMany($url, $type, $resource)
    {
        $data = [];

        $response = json_decode(file_get_contents($url), true);
        $response = $response[$resource];

        if (count($response) > 0) {
            foreach ($response as $item) {
                $data[] = new $type($item);
            }
        }

        return $data;
    }
public function findMany($url, $type, $resource)
    {
        $data = [];

        $response = json_decode(file_get_contents($url), true);
        $response = $response[$resource];

        if (count($response) > 0) {
            foreach ($response as $item) {
                $data[] = new $type($item);
            }
        }

        return $data;
    }
public function findMany ( $ url , $ type , $ resource ) { $ data = [ ] ; $ response = json_decode ( file_get_contents ( $ url ) , true ) ; $ response = $ response [ $ resource ] ; if ( count ( $ response ) > 0 ) { foreach ( $ response as $ item ) { $ data [ ] = new $ type ( $ item ) ; } } return $ data ; }
Get a list of resources

@param string $url      URL to invoke
@param string $type     Class type
@param string $resource The REST Resource

@return object[]
Get a list of resources