code: protected function parsePageLinks($headers = false)
      {
          $pagination = [];
          if (!$headers) {
              $headers = $this->api->lastHeader('link');
          }
  
          /* parse Canvas page links */
          if (preg_match_all('%<([^>]*)>\s*;\s*rel="([^"]+)"%', $headers, $links, PREG_SET_ORDER)) {
              foreach ($links as $link) {
                  $pagination[$link[2]] = new CanvasPageLink($link[1], $link[2]);
              }
          }
  
          return $pagination;
      }
docs: Parse the API response link headers into pagination information
  
  @param  boolean|string[] $headers (Optional, defaults to `$this->api->lastHeader('link')`)
  @return CanvasPageLink[]