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);
        }
    }
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);
        }
    }
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 ) ; } }
Called when data is available on the object.
The resource classes can use this method to process the data.

@param $data
Called when data is available on the object . The resource classes can use this method to process the data .