src/Result.php
public function fetch($mode = null, $complement_info = null, array $ctor_args = array()) {
        $fetchmode = is_null($mode) ? $this->fetchMode : new FetchMode($mode, $complement_info, $ctor_args);
        /* @var $fetchmode FetchMode */
        switch($this->cursorMode) {
            case DB::CURSOR_FIRST:
                $this->rewind();
                break;
            case DB::CURSOR_PREV:
                $this->prev();
                break;
            case DB::CURSOR_NEXT:
                $this->next();
                break;
            case DB::CURSOR_LAST:
                $this->end();
                break;
        }
        $this->setCursorMode(DB::CURSOR_NEXT);
        return $this->valid() ? $this->parseFetched($this->current(), $fetchmode) : false;
    }
public function fetch($mode = null, $complement_info = null, array $ctor_args = array()) {
        $fetchmode = is_null($mode) ? $this->fetchMode : new FetchMode($mode, $complement_info, $ctor_args);
        /* @var $fetchmode FetchMode */
        switch($this->cursorMode) {
            case DB::CURSOR_FIRST:
                $this->rewind();
                break;
            case DB::CURSOR_PREV:
                $this->prev();
                break;
            case DB::CURSOR_NEXT:
                $this->next();
                break;
            case DB::CURSOR_LAST:
                $this->end();
                break;
        }
        $this->setCursorMode(DB::CURSOR_NEXT);
        return $this->valid() ? $this->parseFetched($this->current(), $fetchmode) : false;
    }
public function fetch ( $ mode = null , $ complement_info = null , array $ ctor_args = array ( ) ) { $ fetchmode = is_null ( $ mode ) ? $ this -> fetchMode : new FetchMode ( $ mode , $ complement_info , $ ctor_args ) ; /* @var $fetchmode FetchMode */ switch ( $ this -> cursorMode ) { case DB :: CURSOR_FIRST : $ this -> rewind ( ) ; break ; case DB :: CURSOR_PREV : $ this -> prev ( ) ; break ; case DB :: CURSOR_NEXT : $ this -> next ( ) ; break ; case DB :: CURSOR_LAST : $ this -> end ( ) ; break ; } $ this -> setCursorMode ( DB :: CURSOR_NEXT ) ; return $ this -> valid ( ) ? $ this -> parseFetched ( $ this -> current ( ) , $ fetchmode ) : false ; }
Fetches next row
@param int|null $mode New fetch mode. If null, the result set default fetch mode is used.
@param mixed $complement_info For some fetch modes, additionnal information
@param array $ctor_args For DB::FETCH_CLASS : list of constructor arguments
@return mixed|boolean Fetched row, false if none left.
@see Result::setFetchMode()
Fetches next row