src/CanvasArray.php
protected function requestAllPages($forceRefresh = false)
    {
        $_page = $this->page;
        $_key = $this->key;

        $nextPageNumber = false;
        if (isset($this->pagination[CanvasPageLink::NEXT])) {
            $nextPageNumber = $this->pagination[CanvasPageLink::NEXT]->getPageNumber();
        }

        /* welp, here goes... let's hope we have a next page! */
        while ($nextPageNumber !== false) {
            $this->requestPageNumber($nextPageNumber, $forceRefresh);
            if (isset($this->paginationPerPage[$nextPageNumber][CanvasPageLink::NEXT])) {
                $nextPageNumber = $this->paginationPerPage[$nextPageNumber][CanvasPageLink::NEXT]->getPageNumber();
            } else {
                $nextPageNumber = false;
            }
        }

        $this->page = $_page;
        $this->key = $_key;
    }
protected function requestAllPages($forceRefresh = false)
    {
        $_page = $this->page;
        $_key = $this->key;

        $nextPageNumber = false;
        if (isset($this->pagination[CanvasPageLink::NEXT])) {
            $nextPageNumber = $this->pagination[CanvasPageLink::NEXT]->getPageNumber();
        }

        /* welp, here goes... let's hope we have a next page! */
        while ($nextPageNumber !== false) {
            $this->requestPageNumber($nextPageNumber, $forceRefresh);
            if (isset($this->paginationPerPage[$nextPageNumber][CanvasPageLink::NEXT])) {
                $nextPageNumber = $this->paginationPerPage[$nextPageNumber][CanvasPageLink::NEXT]->getPageNumber();
            } else {
                $nextPageNumber = false;
            }
        }

        $this->page = $_page;
        $this->key = $_key;
    }
protected function requestAllPages ( $ forceRefresh = false ) { $ _page = $ this -> page ; $ _key = $ this -> key ; $ nextPageNumber = false ; if ( isset ( $ this -> pagination [ CanvasPageLink :: NEXT ] ) ) { $ nextPageNumber = $ this -> pagination [ CanvasPageLink :: NEXT ] -> getPageNumber ( ) ; } /* welp, here goes... let's hope we have a next page! */ while ( $ nextPageNumber !== false ) { $ this -> requestPageNumber ( $ nextPageNumber , $ forceRefresh ) ; if ( isset ( $ this -> paginationPerPage [ $ nextPageNumber ] [ CanvasPageLink :: NEXT ] ) ) { $ nextPageNumber = $ this -> paginationPerPage [ $ nextPageNumber ] [ CanvasPageLink :: NEXT ] -> getPageNumber ( ) ; } else { $ nextPageNumber = false ; } } $ this -> page = $ _page ; $ this -> key = $ _key ; }
Request all pages from API

This stores the entire API response locally, in preparation for, most
likely, serializing this object.

@param bool $forceRefresh (Optional) Force a refresh of backing data,
even if cached (defaults to `FALSE`)

@return void
Request all pages from API