public function next()
    {
        if (! $this->startedIterating) {
            $this->ensureIterator();
            $this->startedIterating = true;
        } else {
            if ($this->cursorNeedsAdvancing) {
                $this->ensureIterator()->next();
            }

            $this->cursorNeedsAdvancing = true;
            $this->position++;
        }

        return $this->storeIteratorState();
    }
public function next()
    {
        if (! $this->startedIterating) {
            $this->ensureIterator();
            $this->startedIterating = true;
        } else {
            if ($this->cursorNeedsAdvancing) {
                $this->ensureIterator()->next();
            }

            $this->cursorNeedsAdvancing = true;
            $this->position++;
        }

        return $this->storeIteratorState();
    }
public function next ( ) { if ( ! $ this -> startedIterating ) { $ this -> ensureIterator ( ) ; $ this -> startedIterating = true ; } else { if ( $ this -> cursorNeedsAdvancing ) { $ this -> ensureIterator ( ) -> next ( ) ; } $ this -> cursorNeedsAdvancing = true ; $ this -> position ++ ; } return $ this -> storeIteratorState ( ) ; }
Advances the cursor to the next result, and returns that result
@link http://www.php.net/manual/en/mongocursor.next.php
@throws \MongoConnectionException
@throws \MongoCursorTimeoutException
@return array Returns the next object
Advances the cursor to the next result and returns that result