I was looking at Zend_Paginator in Zend Framework project using MVC, and it looks like an intersting tool.
It looks like we can give a select object as argument to the factory, it’s interesting because it means that i should return a select object from my model, is it a good way to do ?
It seems to be a bit heavy to do this, since it won’t be needed all the times…
I can also give an array, which could come as a result of my method model, but in the case where i have a lot of data, it could be complicated to retrieve all the data from my database each times.
How can i handle this ?
Well, i finally found an interesting way to do.
First, i implemented a Domain Model pattern after a read on Matthew Weier O’Phinney’s blog, who explains how to.
Then, i created my own adapter of Zend_Paginator, to agree with my Model.
It’s the most interesting way to do, i’ve found until now.