Re: PHP 4.0 Bug #2675 Updated: Misbehavior of object initializers
| From: | ZeroDiVide | Date: | Sat, 06 Nov 1999 16:57:23 +0000 |
| Subject: | Re: PHP 4.0 Bug #2675 Updated: Misbehavior of object initializers | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-12177@lists.php.net to get a copy of this message | ||
> You should use the Factory design pattern I suppose. How about the following:
>
> And then do something like (actually it doesn't even need to be
> $new_db = DB::Factory('mysql');
So i guess the larger question here is are we doing java symantics or
c++ ?
Maybee i don't understand the whole issue here, but i thought
the point of overloading the constructor was to do whatever you want
with it. Including stupid stuff like returning another object.
Thanks,
--------------------------------------------------------------------------------
| Jason "ZeroDiVide" Orcutt "Code is life is Code" |
| Prometheus Project - http://prometheus.zerodivide.net
|
--------------------------------------------------------------------------------