Core/src/Iterator/ItemIteratorTrait.php
public function valid()
    {
        $page = $this->pageIterator->current();

        if (isset($page[$this->pageIndex])) {
            return true;
        }

        // If there are no results, but a token for the next page
        // exists let's continue paging until there are results.
        while ($this->nextResultToken()) {
            $this->pageIterator->next();
            $page = $this->pageIterator->current();

            if (isset($page[$this->pageIndex])) {
                return true;
            }
        }

        return false;
    }
public function valid()
    {
        $page = $this->pageIterator->current();

        if (isset($page[$this->pageIndex])) {
            return true;
        }

        // If there are no results, but a token for the next page
        // exists let's continue paging until there are results.
        while ($this->nextResultToken()) {
            $this->pageIterator->next();
            $page = $this->pageIterator->current();

            if (isset($page[$this->pageIndex])) {
                return true;
            }
        }

        return false;
    }
public function valid ( ) { $ page = $ this -> pageIterator -> current ( ) ; if ( isset ( $ page [ $ this -> pageIndex ] ) ) { return true ; } // If there are no results, but a token for the next page // exists let's continue paging until there are results. while ( $ this -> nextResultToken ( ) ) { $ this -> pageIterator -> next ( ) ; $ page = $ this -> pageIterator -> current ( ) ; if ( isset ( $ page [ $ this -> pageIndex ] ) ) { return true ; } } return false ; }
Determines if the current position is valid.

@return bool
Determines if the current position is valid .