Reputation: 277
I'm trying to design my application using fat model thin controller approach like described by Matthew Weier O'Phinney, in zend quickstart guide or Bill Karwin's blog note
but currently I'm trying to implement pagination using Zend_Paginator
and I have trouble since every example I found is based on model which simply extends Zend_Db_Table
.
At this moment I'm using Zend_Paginator_Adapter_Array
which contains array of models(range,not all records from database), only problem is that I cant set overall items count.
Can someone give me advice what approach is correct? Should I write my custom Pagination adapter or maybe change actual design and use models based on zend_db_table?
Greetings
Upvotes: 1
Views: 120
Reputation: 11217
The array adapter was created for a situation when you have a huge array and you want to show only a portion of it. You have to set FULL array for that adapter to work as expected.
Best option for DB results would be adapter DbSelect and using Zend_Db_Select ;)
Upvotes: 1