Re: How can I do this -- method chaining

From: Date: Tue, 29 Jan 2008 20:02:57 +0000
Subject: Re: How can I do this -- method chaining
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-268279@lists.php.net to get a copy of this message
On 29 Jan 2008, at 19:43, Christoph Boget <jcboget@yahoo.com> wrote:
On Jan 29, 2008 2:37 PM, Paul Scott <pscott@uwc.ac.za> wrote:
Looks like a repurpose of one of my posts:
http://fsiu.uwc.ac.za/index.php?module=blog&action=viewsingle&postid=gen9Srv59Nme5_7092_1182404204
actually, this is slightly different; here we are talking about being able to immediately invoke a method off the call to the constructor, whereas in your post you chain calls after storing the instance in a variable in the call to the constructor.
Right, and that's what I was trying to avoid, if possible.
Why? What exactly do you think you're saving by not putting the instance in a variable? I can't think of one good reason to do this. -Stut -- http://stut.net/

« previous php.general (#268279) next »