RE: Method chaining off constructors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > Why?  I thought constructors returned the object?
> It's been a while since I've played with objects in PHP, but couldn't
> you just add the line:
> return $this;
> ...to the end of your __construct() function? Sorry if this is obtuse of
> me to say, I just thought maybe the answer was that simple and you're
> like I am--you've been staring at a tree for so long, racking your
> brain, that you forget about the forest altogether. :)

The constructor should already be returning $this.

thnx,
Christoph


      

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux