Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Zend_Db_Select
-
Labels:None
-
Tags:
Description
<?php // 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); }