lib/recurly/pager.php
private function _loadLinks($response) {
    $this->_links = array();

    if (isset($response->headers['link'])) {
      $links = $response->headers['link'];
      preg_match_all('/\<([^>]+)\>; rel=\"([^"]+)\"/', $links, $matches);
      if (sizeof($matches) > 2) {
        for ($i = 0; $i < sizeof($matches[1]); $i++) {
          $this->_links[$matches[2][$i]] = $matches[1][$i];
        }
      }
    }
  }
private function _loadLinks($response) {
    $this->_links = array();

    if (isset($response->headers['link'])) {
      $links = $response->headers['link'];
      preg_match_all('/\<([^>]+)\>; rel=\"([^"]+)\"/', $links, $matches);
      if (sizeof($matches) > 2) {
        for ($i = 0; $i < sizeof($matches[1]); $i++) {
          $this->_links[$matches[2][$i]] = $matches[1][$i];
        }
      }
    }
  }
private function _loadLinks ( $ response ) { $ this -> _links = array ( ) ; if ( isset ( $ response -> headers [ 'link' ] ) ) { $ links = $ response -> headers [ 'link' ] ; preg_match_all ( '/\<([^>]+)\>; rel=\"([^"]+)\"/' , $ links , $ matches ) ; if ( sizeof ( $ matches ) > 2 ) { for ( $ i = 0 ; $ i < sizeof ( $ matches [ 1 ] ) ; $ i ++ ) { $ this -> _links [ $ matches [ 2 ] [ $ i ] ] = $ matches [ 1 ] [ $ i ] ; } } } }
The 'Links' header contains links to the next, previous, and starting pages.
This parses the links header into an array of links if the header is present.

@param $response
The Links header contains links to the next previous and starting pages . This parses the links header into an array of links if the header is present .