src/View/SSViewer_Scope.php
public function next()
    {
        if (!$this->item) {
            return false;
        }

        if (!$this->itemIterator) {
            if (is_array($this->item)) {
                $this->itemIterator = new ArrayIterator($this->item);
            } else {
                $this->itemIterator = $this->item->getIterator();
            }

            $this->itemStack[$this->localIndex][SSViewer_Scope::ITEM_ITERATOR] = $this->itemIterator;
            $this->itemIteratorTotal = iterator_count($this->itemIterator); // Count the total number of items
            $this->itemStack[$this->localIndex][SSViewer_Scope::ITEM_ITERATOR_TOTAL] = $this->itemIteratorTotal;
            $this->itemIterator->rewind();
        } else {
            $this->itemIterator->next();
        }

        $this->resetLocalScope();

        if (!$this->itemIterator->valid()) {
            return false;
        }

        return $this->itemIterator->key();
    }
public function next()
    {
        if (!$this->item) {
            return false;
        }

        if (!$this->itemIterator) {
            if (is_array($this->item)) {
                $this->itemIterator = new ArrayIterator($this->item);
            } else {
                $this->itemIterator = $this->item->getIterator();
            }

            $this->itemStack[$this->localIndex][SSViewer_Scope::ITEM_ITERATOR] = $this->itemIterator;
            $this->itemIteratorTotal = iterator_count($this->itemIterator); // Count the total number of items
            $this->itemStack[$this->localIndex][SSViewer_Scope::ITEM_ITERATOR_TOTAL] = $this->itemIteratorTotal;
            $this->itemIterator->rewind();
        } else {
            $this->itemIterator->next();
        }

        $this->resetLocalScope();

        if (!$this->itemIterator->valid()) {
            return false;
        }

        return $this->itemIterator->key();
    }
public function next ( ) { if ( ! $ this -> item ) { return false ; } if ( ! $ this -> itemIterator ) { if ( is_array ( $ this -> item ) ) { $ this -> itemIterator = new ArrayIterator ( $ this -> item ) ; } else { $ this -> itemIterator = $ this -> item -> getIterator ( ) ; } $ this -> itemStack [ $ this -> localIndex ] [ SSViewer_Scope :: ITEM_ITERATOR ] = $ this -> itemIterator ; $ this -> itemIteratorTotal = iterator_count ( $ this -> itemIterator ) ; // Count the total number of items $ this -> itemStack [ $ this -> localIndex ] [ SSViewer_Scope :: ITEM_ITERATOR_TOTAL ] = $ this -> itemIteratorTotal ; $ this -> itemIterator -> rewind ( ) ; } else { $ this -> itemIterator -> next ( ) ; } $ this -> resetLocalScope ( ) ; if ( ! $ this -> itemIterator -> valid ( ) ) { return false ; } return $ this -> itemIterator -> key ( ) ; }
Fast-forwards the current iterator to the next item

@return mixed
Fast - forwards the current iterator to the next item