lib/HttpClient.php
protected function unwrapEnvelope(array $body)
  {
    if (isset($body['data']))
    {
      return $body['data'];
    }
    else if (isset($body['items']))
    {
      $items = array();
      foreach ($body['items'] as $item)
      {
        $items[] = $item;
      }

      return $items;
    }
    return $body;
  }
protected function unwrapEnvelope(array $body)
  {
    if (isset($body['data']))
    {
      return $body['data'];
    }
    else if (isset($body['items']))
    {
      $items = array();
      foreach ($body['items'] as $item)
      {
        $items[] = $item;
      }

      return $items;
    }
    return $body;
  }
protected function unwrapEnvelope ( array $ body ) { if ( isset ( $ body [ 'data' ] ) ) { return $ body [ 'data' ] ; } else if ( isset ( $ body [ 'items' ] ) ) { $ items = array ( ) ; foreach ( $ body [ 'items' ] as $ item ) { $ items [ ] = $ item ; } return $ items ; } return $ body ; }
Perform envelope unwrapping

@param array $body Associative array after json decoding.
@return mixed Either single resource or array of associative resources.

@ignore
Perform envelope unwrapping