/** * @group ZF-3775 */ public function testSelectDoesReturnZendDbTableRowset() { $query = $this->_table->select(); $adapter = new Zend_Paginator_Adapter_DbTableSelect($query); $items = $adapter->getItems(0, 10); $this->assertTrue($items instanceof Zend_Db_Table_Rowset); }
/** * Returns an array of Entry items for a page. * * @param integer $offset Page offset * @param integer $itemCountPerPage Number of items per page * @return array */ public function getItems($offset, $itemCountPerPage) { $entryRowset = parent::getItems($offset, $itemCountPerPage); $entries = array(); /* @var $entryRow Zend_Db_Table_Row_Abstract */ foreach ($entryRowset as $entryRow) { $entry = $this->_entryMapper->createEntryFromRow($entryRow); $entries[] = $entry; } return $entries; }
public function getItems($offset, $itemCountPerPage) { $resultSet = parent::getItems($offset, $itemCountPerPage); $models = $this->getModelsFromResultSet($resultSet); return $models; }