Re: Fwd: Re: [PHP-DEV] Assigning to $this
| From: | Lorenzo Alberton | Date: | Wed, 04 Feb 2004 22:11:17 +0000 |
| Subject: | Re: Fwd: Re: [PHP-DEV] Assigning to $this | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25508@lists.php.net to get a copy of this message | ||
On Wed, 4 Feb 2004 21:29:04 +0100, Pierre-Alain Joye wrote:
> On Wed, 4 Feb 2004 20:37:33 +0100
> Lorenzo Alberton <l.alberton@quipo.it> wrote:
>> thanks for the useful comment.
>
> It is usefull. And more than an advice, a rule :)
> pierre
ok, assigning to $this is *not* a good practice,
I know the ABC. What I'm saying is: sometimes you
have no alternative, if breaking BC is not an option.
"Just don't use it" is not much of an advice.
"Do this instead" is.
Anyway, back to my first question, does anyone
know an alternative solution to "$this = $that;",
which works both on PHP4 and PHP5,
without resorting to ugly proxy calls?
Or, if you prefer, what's the common practice
regarding delegates? How can they be implemented
in PHP4, and what's the footprint?
@Lingwitt (CC'ed): can we see the code of your
PEAR_DelegateOwner? I admit I failed to see the
need of such class until today, but now I understand
how useful it can be.
Best regards,
Lorenzo