public function next() {
		if ($this->_buffer) {
			list($this->_key, $this->_current) = array_shift($this->_buffer);
			return $this->_current;
		}

		if (!$next = $this->_fetch()) {
			$this->_key = null;
			$this->_current = null;
			$this->_valid = false;

			return null;
		} else {
			list($this->_key, $this->_current) = $next;
			$this->_valid = true;
		}
		return $this->_current;
	}
public function next() {
		if ($this->_buffer) {
			list($this->_key, $this->_current) = array_shift($this->_buffer);
			return $this->_current;
		}

		if (!$next = $this->_fetch()) {
			$this->_key = null;
			$this->_current = null;
			$this->_valid = false;

			return null;
		} else {
			list($this->_key, $this->_current) = $next;
			$this->_valid = true;
		}
		return $this->_current;
	}
public function next ( ) { if ( $ this -> _buffer ) { list ( $ this -> _key , $ this -> _current ) = array_shift ( $ this -> _buffer ) ; return $ this -> _current ; } if ( ! $ next = $ this -> _fetch ( ) ) { $ this -> _key = null ; $ this -> _current = null ; $ this -> _valid = false ; return null ; } else { list ( $ this -> _key , $ this -> _current ) = $ next ; $ this -> _valid = true ; } return $ this -> _current ; }
Fetches the next element from the resource.

@return mixed The next result (or `null` if there is none).
Fetches the next element from the resource .