original_string: protected function parseResponse( $data ) {
              if (!array_key_exists($this->arrayKey, $data)) {
                  throw new \Paysafe\PaysafeException('Missing array key from results');
              }
              foreach ($data[$this->arrayKey] as $row) {
                  array_push($this->results, new $this->className($row));
              }
  
              $this->nextPage = null;
  
              if (array_key_exists('links', $data)) {
                  foreach ($data['links'] as $link) {
                      if ($link['rel'] == 'next') {
                          $this->nextPage = new \Paysafe\Link($link);
                      }
                  }
              }
          }
code: protected function parseResponse( $data ) {
              if (!array_key_exists($this->arrayKey, $data)) {
                  throw new \Paysafe\PaysafeException('Missing array key from results');
              }
              foreach ($data[$this->arrayKey] as $row) {
                  array_push($this->results, new $this->className($row));
              }
  
              $this->nextPage = null;
  
              if (array_key_exists('links', $data)) {
                  foreach ($data['links'] as $link) {
                      if ($link['rel'] == 'next') {
                          $this->nextPage = new \Paysafe\Link($link);
                      }
                  }
              }
          }
code_tokens: protected function parseResponse ( $ data ) { if ( ! array_key_exists ( $ this -> arrayKey , $ data ) ) { throw new \ Paysafe \ PaysafeException ( 'Missing array key from results' ) ; } foreach ( $ data [ $ this -> arrayKey ] as $ row ) { array_push ( $ this -> results , new $ this -> className ( $ row ) ) ; } $ this -> nextPage = null ; if ( array_key_exists ( 'links' , $ data ) ) { foreach ( $ data [ 'links' ] as $ link ) { if ( $ link [ 'rel' ] == 'next' ) { $ this -> nextPage = new \ Paysafe \ Link ( $ link ) ; } } } }
docstring: Parse the response for the result set and next page.
  
  @param type $data
  @throws PaysafeException
docstring_tokens: Parse the response for the result set and next page .