RE: [PEAR-DEV] general questions
| From: | Richard Heyes | Date: | Thu, 29 Nov 2001 00:51:44 +0000 |
| Subject: | RE: [PEAR-DEV] general questions | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-3167@lists.php.net to get a copy of this message | ||
> > > > > But why do stuff like DB::connect ?
> > > > > Why not put stuff like that in a constructor?
> > > >
> > > > Because DB::connect() can return you a correct object type (ie
> > mysql/pgsql).
> > >
> Well an object can do this also. You just require the proper code in the
> constructor ... Ulf called this a factory in his speech at the php
> conference iirc
True, but you need an object first. What's the point in creating an object
just to get another object?
--
Richard Heyes
"If you have any trouble sounding condescending,
find a Unix user to show you how it's done." - Scott Adams