original_string: protected function onData($data)
      {
          if (is_null($this->totalRecordCount)) {
              $this->totalRecordCount = $data->total_record_count;
          }
  
          if (!isset($data->{$this->responseKey})) {
              return;
          }
  
          foreach ($data->{$this->responseKey} as $result) {
              $this->resources[] = $this->convertToResource($result);
          }
      }
code: protected function onData($data)
      {
          if (is_null($this->totalRecordCount)) {
              $this->totalRecordCount = $data->total_record_count;
          }
  
          if (!isset($data->{$this->responseKey})) {
              return;
          }
  
          foreach ($data->{$this->responseKey} as $result) {
              $this->resources[] = $this->convertToResource($result);
          }
      }
code_tokens: protected function onData ( $ data ) { if ( is_null ( $ this -> totalRecordCount ) ) { $ this -> totalRecordCount = $ data -> total_record_count ; } if ( ! isset ( $ data -> { $ this -> responseKey } ) ) { return ; } foreach ( $ data -> { $ this -> responseKey } as $ result ) { $ this -> resources [ ] = $ this -> convertToResource ( $ result ) ; } }
docstring: Called when data is available on the object.
  The resource classes can use this method to process the data.
  
  @param $data
docstring_tokens: Called when data is available on the object . The resource classes can use this method to process the data .