I could have made this work, but decided to try and write a Zend_Paginator adapter. It turns out (at least in this case) it was incredibly simple.
- I copied the DbTableSelect adapter, which only has one method, get items.
- I updated the constructor to take a Dig_Model rather than a select object. It sets the model, and then passes the model's select object down to the parent Zend_Paginator_Adapter_DbSelect class.
- I updated the getItems method, so it uses the model's fetchAll() method, rather than the Zend_Db_Select fetchAll() method.
No comments:
Post a Comment