19c19 < * @version $Id: DbSelect.php 11426 2008-09-18 12:56:45Z norm2782 $ --- > * @version $Id: DbSelect.php 11425 2008-09-18 12:47:55Z norm2782 $ 66a67,82 > * Decide wether to return a Zend_Db_Table_Rowset when dealing with > * a Zend_Db_Table_Select > * > * @var boolean > */ > protected static $_returnTableRowsetDefault = true; > > /** > * Decide wether to return a Zend_Db_Table_Rowset when dealing with > * a Zend_Db_Table_Select > * > * @var boolean > */ > protected $_returnTableRowset = null; > > /** 73a90 > $this->_returnTableRowset = self::$_returnTableRowsetDefault; 76a94,118 > * Decide wether to return a Zend_Db_Table_Rowset when dealing with > * a Zend_Db_Table_Select > * > * @param boolean $flag > * @return Zend_Paginator_Adapter_DbSelect > */ > public function setReturnTableRowset($flag = true) > { > $this->_returnTableRowset = $flag; > > return $this; > } > > /** > * Decide wether to return a Zend_Db_Table_Rowset when dealing with > * a Zend_Db_Table_Select > * > * @param boolean $flag > */ > public static function setReturnTableRowsetDefault($flag = true) > { > self::$_returnTableRowsetDefault = $flag; > } > > /** 130a173,174 > * If the adapter has been provided with a Zend_Db_Table_Select and is set > * to return a Zend_Db_Table_Rowset, this method will return a rowset instead. 134c178 < * @return array --- > * @return array|Zend_Db_Table_Rowset 140c184,190 < return $this->_select->query()->fetchAll(); --- > if ($this->_select instanceof Zend_Db_Table_Select && $this->_returnTableRowset) { > $result = $this->_select->getTable()->fetchAll($this->_select); > } else { > $result = $this->_select->query()->fetchAll(); > } > > return $result;