Is there a way to use Zend_Paginator Without DbSelect/DbTableSelect adapter without having to fetch whole data set?
I have 2000 objects I want to paginate with Zend_Paginator but I cannot use DbSelect/DbTableSelect for a certain reason.
Is there a way to to this? I could use array for example but that would load all 2000 objects at every page.
I think that the bast way to achieve that is writing your own adapter which will implement Zend_Paginator_Interface
(which implements Countable
). Then you can hide all your logic behind that adapter and use Zend_Paginator
as always.
Couple paragraphs about custom sources: Zend_Paginator advanced usage .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.