Zend_Paginator Without DbSelect/DbTableSelect adapter

364 views Asked by At

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.

1

There are 1 answers

0
Radek Benkel On BEST ANSWER

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.