Return-Path: <fw-general-return-20540-david=example.org@lists.zend.com>
X-Original-To: david@example.org
Delivered-To: david@example.org
Received: by mail.palepurple.co.uk (Postfix, from userid 1007)
	id A41BE894CF8; Tue,  5 Aug 2008 19:46:09 +0100 (BST)
Received: from localhost (localhost [127.0.0.1])
	by mail.palepurple.co.uk (Postfix) with ESMTP id 6786E894CF9
	for <david@example.org>; Tue,  5 Aug 2008 19:46:09 +0100 (BST)
X-Virus-Scanned: by Amavis+SpamAssassin+ClamAV and more at palepurple.co.uk
X-Spam-Score: -2.478
X-Spam-Level: 
X-Spam-Status: No, score=-2.478 tagged_above=-99 required=5 tests=[AWL=0.545,
	BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1,
	SPF_HELO_NEUTRAL=0.576, SPF_PASS=-0.001]
Received: from mail.palepurple.co.uk ([127.0.0.50])
	by localhost (oak.palepurple.co.uk [127.0.0.50]) (amavisd-new, port 10024)
	with ESMTP id F7C1kX6O4LsN for <david@example.org>;
	Tue,  5 Aug 2008 19:46:01 +0100 (BST)
Received: from www.zend.com (lists.zend.com [67.15.86.102])
	by mail.palepurple.co.uk (Postfix) with SMTP id 83287894CF8
	for <david@example.org>; Tue,  5 Aug 2008 19:46:01 +0100 (BST)
Received: (qmail 28760 invoked by uid 505); 5 Aug 2008 18:45:46 -0000
Mailing-List: contact fw-general-help@lists.zend.com; run by ezmlm
Precedence: bulk
List-Post: <mailto:fw-general@lists.zend.com>
List-Help: <mailto:fw-general-help@lists.zend.com>
List-Unsubscribe: <mailto:fw-general-unsubscribe@lists.zend.com>
List-Subscribe: <mailto:fw-general-subscribe@lists.zend.com>
Delivered-To: mailing list fw-general@lists.zend.com
Received: (qmail 28753 invoked from network); 5 Aug 2008 18:45:46 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.com;
  h=Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Message-ID;
  b=RX7cjkrkpdsfHOXg2TRzzF2P5UXe0S5UVRucVl9FdqyE070/mV2za8ehvsGVRTh11tjkhkzh9QJoijpzHTTyu8F4HUHHoql4wUS6zJJC/PgdcCpBVXf0Im4RkyXqhIOAndNk1d9tCPmUnKDjC6SvO6i0Xd5+CqFH9f+eaKzUFAI=;
X-Mailer: YahooMailRC/1042.48 YahooMailWebService/0.7.218
Date: Tue, 5 Aug 2008 11:45:44 -0700 (PDT)
From: =?iso-8859-1?Q?P=E1draic_Brady?= <some.one@yahoo.com>
To: Some one Else <someone.else@gmail.com>
Cc: Zend Framework General <overthere@example.org>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-283769398-1217961944=:498"
Message-ID: <944272.498.qm@web55003.mail.re4.yahoo.com>
X-pstn-neptune: 0/0/0.00/0
X-pstn-levels:     (S:99.90000/99.90000 CV:99.0000 P:95.9108 M:97.0282 C:98.6951 )
X-pstn-settings: 1 (0.1500:0.1500) cv gt3 gt2 gt1 p m c 
X-pstn-addresses: from <some.one@yahoo.com> [638/31] 
Subject: Re: [fw-general] Zend_Paginate how to integrate?
Content-Length: 4072
Lines: 60

--0-283769398-1217961944=:498
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

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 co=
ntrollers by pushing reusable code into Model (or other) objects if appropr=
iate.=0A=0A P=E1draic Brady=0A=0Ahttp://blog.astrumfutura.com=0Ahttp://www.=
patternsforphp.com=0AOpenID Europe Foundation=0A=0A=0A=0A=0A----- Original =
Message ----=0AFrom: Giorgio Sironi <whatever@example.org>=0ATo=
: Axel W=FCstemann <awu@xxxqbus.de>=0ACc: fw-general@xxlists.zend.com=0ASent: Tu=
esday, August 5, 2008 7:20:48 PM=0ASubject: Re: [fw-general] Zend_Paginate =
how to integrate?=0A=0A2008/8/5 Axel W=FCstemann <awuxxxx@qbus.de>:=0A> Yes, it=
 seems to me a good idea to let reside the paginator in the model.=0A> What=
 happens in the controller? How the view comes into play?=0A=0AThe controll=
er simply calls the method prepareArticles with the right=0Apage (a param o=
f request) and pass the paginator to the view, so the=0Aview script can use=
 it for helpers like PaginationControl. Note that=0Abecause the paginator g=
oes into the view, it return only=0Amultidimensional array and not objects.=
=0A=0A-- =0AGiorgio Sironi=0APiccolo Principe & Ossigeno Scripter=0Ahttp://=
www.sourceforge.net/projects/ossigeno=0A
--0-283769398-1217961944=:498
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<html><head></he=
ad>
I do pretty much what Giorgio suggests and tie i=
t into the Model as much as possible - fits into the concept of doing as li=
ttle as possible in your controllers by pushing reusable code into Model (o=
r other) objects if appropriate.

 
P=E1draic Bra=
dy

http://blog=
.astrumfutura.com
http://www.patternsforphp.com<b=
r>OpenID Europe Foundation

----- Original Message ----
From: Giorgio Sironi <pic=
coloprincipeazzurroxxxxx@gxxxmail.com>
To: Axel W=FCstemann <awuxx@qbus.de&g=
t;
Cc: fw-general@xxxlists.zend.com
Sent: Tuesday, August 5, 2008 7:20:4=
8 PM
Subject: Re: [fw-general] Zend_Paginate how to integrate?

=
=0A2008/8/5 Axel W=FCstemann <xxawu@qxxxbus.de>:
> 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 cal=
ls the method prepareArticles with the right
page (a param of request) a=
nd pass the paginator to the view, so the
view script can use it for hel=
pers like PaginationControl. Note that
because the paginator goes into t=
he view, it return only
multidimensional array and not objects.

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

</htm=
l>
--0-283769398-1217961944=:498--
