src/Result.php
public function fetchAll($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 */
        $rows = array();
        foreach($this->prefetched as $row) {
            if($fetchmode->hasMode(DB::FETCHALL_KEY_PAIR)) {
                $rows[array_shift($row)] = array_shift($row);
            } elseif($fetchmode->hasMode(DB::FETCHALL_UNIQUE)) {
                $rows[array_shift($row)] = $this->parseFetched($rows, $fetchmode);
            } else {
                $rows[] = $this->parseFetched($rows, $fetchmode);
            }
        }
        return $rows;
    }
public function fetchAll($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 */
        $rows = array();
        foreach($this->prefetched as $row) {
            if($fetchmode->hasMode(DB::FETCHALL_KEY_PAIR)) {
                $rows[array_shift($row)] = array_shift($row);
            } elseif($fetchmode->hasMode(DB::FETCHALL_UNIQUE)) {
                $rows[array_shift($row)] = $this->parseFetched($rows, $fetchmode);
            } else {
                $rows[] = $this->parseFetched($rows, $fetchmode);
            }
        }
        return $rows;
    }
public function fetchAll ( $ 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 */ $ rows = array ( ) ; foreach ( $ this -> prefetched as $ row ) { if ( $ fetchmode -> hasMode ( DB :: FETCHALL_KEY_PAIR ) ) { $ rows [ array_shift ( $ row ) ] = array_shift ( $ row ) ; } elseif ( $ fetchmode -> hasMode ( DB :: FETCHALL_UNIQUE ) ) { $ rows [ array_shift ( $ row ) ] = $ this -> parseFetched ( $ rows , $ fetchmode ) ; } else { $ rows [ ] = $ this -> parseFetched ( $ rows , $ fetchmode ) ; } } return $ rows ; }
Fetches all found rows as an array
@param int|null $mode Fetch mode to use. If null, will use the result set default fetch mode
@param mixed $complement_info For some fetch modes, additionnal information
@param array $ctor_args For DB::FETCH_CLASS : list of constructor arguments
@return array list of fetched rows
@see Result::setFetchMode
Fetches all found rows as an array