public static function index($client) {
    $response = $client->get(static::$path);

    $data = (array) $response->json();

    $class = get_called_class();

    $resources = array();
    foreach (array_shift($data) as $resourceData) {
      $resources[] = new $class($client, $resourceData);
    }

    return $resources;
  }
public static function index($client) {
    $response = $client->get(static::$path);

    $data = (array) $response->json();

    $class = get_called_class();

    $resources = array();
    foreach (array_shift($data) as $resourceData) {
      $resources[] = new $class($client, $resourceData);
    }

    return $resources;
  }
public static function index ( $ client ) { $ response = $ client -> get ( static :: $ path ) ; $ data = ( array ) $ response -> json ( ) ; $ class = get_called_class ( ) ; $ resources = array ( ) ; foreach ( array_shift ( $ data ) as $ resourceData ) { $ resources [ ] = new $ class ( $ client , $ resourceData ) ; } return $ resources ; }
Retrieves a list of resources

@param M2X $client
@return array
Retrieves a list of resources