I'm currently implementing my DAL using DAO's. I would like to do pagination at the database level, so in my DAO's I currently have methods like
getEvents($page, $limit)
and
getEventCount()
Then in my service layer I'm returning an array
array($events, $eventCount)
and setting up the pagination in my controller (using Zend_Paginator).
Something doesn't seem right about this approach, but I can't put my finger on it.