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 implementsCountable
). Then you can hide all your logic behind that adapter and useZend_Paginator
as always.Couple paragraphs about custom sources: Zend_Paginator advanced usage.