Hi, when I use the Zend\Paginator with the Zend\Paginator\Adapter\DbSelect Adapter I can set a prototype for the result set. If I want to get my own user entity object back from the paginator I would need to implement the Zend\Db\ResultSet\ResultSetInterface in my user entity class which also extends Traversable and Countable interfaces.
Another way would be to use a hydrator class which takes the data from the result set and passes it to an instance of my user entity class. But since the reading of the data with the help of the Paginator only starts when the view script is processed, I would need to implement this in my view script or a view helper. This seems like a bad design. So, I wonder if I could configure the DbSelect Adapter to use my own user entity class instead of an ArrayObject which is created from the ResultSet. Regards, Ralf -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
