public function next()
    {
        if (null === $this->_batch || !$this->each || $this->each && false === next($this->_batch)) {
            $this->_batch = $this->fetchData();
            reset($this->_batch);
        }
        if ($this->each) {
            $this->_value = current($this->_batch);
            if (null !== key($this->_batch)) {
                ++$this->_key;
            } else {
                $this->_key = null;
            }
        } else {
            $this->_value = $this->_batch;
            $this->_key = null === $this->_key ? 0 : $this->_key + 1;
        }
    }
public function next()
    {
        if (null === $this->_batch || !$this->each || $this->each && false === next($this->_batch)) {
            $this->_batch = $this->fetchData();
            reset($this->_batch);
        }
        if ($this->each) {
            $this->_value = current($this->_batch);
            if (null !== key($this->_batch)) {
                ++$this->_key;
            } else {
                $this->_key = null;
            }
        } else {
            $this->_value = $this->_batch;
            $this->_key = null === $this->_key ? 0 : $this->_key + 1;
        }
    }
public function next ( ) { if ( null === $ this -> _batch || ! $ this -> each || $ this -> each && false === next ( $ this -> _batch ) ) { $ this -> _batch = $ this -> fetchData ( ) ; reset ( $ this -> _batch ) ; } if ( $ this -> each ) { $ this -> _value = current ( $ this -> _batch ) ; if ( null !== key ( $ this -> _batch ) ) { ++ $ this -> _key ; } else { $ this -> _key = null ; } } else { $ this -> _value = $ this -> _batch ; $ this -> _key = null === $ this -> _key ? 0 : $ this -> _key + 1 ; } }
Moves the internal pointer to the next dataset.
This method is required by the interface Iterator.
Moves the internal pointer to the next dataset . This method is required by the interface Iterator .