I do pretty much what Giorgio suggests and tie it into the Model as much as 
possible - fits into the concept of doing as little as possible in your 
controllers by pushing reusable code into Model (or other) objects if 
appropriate.

 Pádraic Brady

http://blog.astrumfutura.com
http://www.patternsforphp.com
OpenID Europe Foundation




----- Original Message ----
From: Giorgio Sironi <[EMAIL PROTECTED]>
To: Axel Wüstemann <[EMAIL PROTECTED]>
Cc: [email protected]
Sent: Tuesday, August 5, 2008 7:20:48 PM
Subject: Re: [fw-general] Zend_Paginate how to integrate?

2008/8/5 Axel Wüstemann <[EMAIL PROTECTED]>:
> Yes, it seems to me a good idea to let reside the paginator in the model.
> What happens in the controller? How the view comes into play?

The controller simply calls the method prepareArticles with the right
page (a param of request) and pass the paginator to the view, so the
view script can use it for helpers like PaginationControl. Note that
because the paginator goes into the view, it return only
multidimensional array and not objects.

-- 
Giorgio Sironi
Piccolo Principe & Ossigeno Scripter
http://www.sourceforge.net/projects/ossigeno

Reply via email to