ZF-7931: Fetching methods for Zend_Db_Table_Select



// Example

// we can instantiate paginator in controller
$this->view->paginator = $table->getPaginator($table->getSelectLastNews(), $page, $limit);

// and fetch all entries
$this->view->last_news = $table->fetchAll($table->getSelectLastNews());

// OR we can use the following code

$this->view->paginator = $table->getSelectLastNews()->getPaginator($page, $limit);
$this->view->last_news = $table->getSelectLastNews()->fetchAll(/* $limit */);

// solution in Db_Table_Select
public function fetchAll($limit = 10) // proxy
    return $this->getTable()->fetchAll($this->limit($limit));

public function getPaginator($page, $limit = 10) // proxy
    // assume we have Paginator in Model
    return $this->getTable()->getPaginator($select, $page, $limit);


Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.