public function getNextBatch()
    {
        if ($this->_result === [] && $this->_hasMore) {
            // read more from server
            $this->fetchOutstanding();
        }

        if ($this->_result !== []) {
            $result        = $this->_result;
            $this->_result = [];

            return $result;
        }

        // cursor is exhausted
        return false;
    }
public function getNextBatch()
    {
        if ($this->_result === [] && $this->_hasMore) {
            // read more from server
            $this->fetchOutstanding();
        }

        if ($this->_result !== []) {
            $result        = $this->_result;
            $this->_result = [];

            return $result;
        }

        // cursor is exhausted
        return false;
    }
public function getNextBatch ( ) { if ( $ this -> _result === [ ] && $ this -> _hasMore ) { // read more from server $ this -> fetchOutstanding ( ) ; } if ( $ this -> _result !== [ ] ) { $ result = $ this -> _result ; $ this -> _result = [ ] ; return $ result ; } // cursor is exhausted return false ; }
Get next results as an array

This might issue additional HTTP requests to fetch any outstanding
results from the server

@throws Exception
@return mixed - an array with the next results or false if the cursor is exhausted
Get next results as an array