Re: singleton mathod name (do pear packages create their own seperate DB connections?)
| From: | Martin Jansen | Date: | Thu, 24 Apr 2003 09:53:33 +0000 |
| Subject: | Re: singleton mathod name (do pear packages create their own seperate DB connections?) | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-15442@lists.php.net to get a copy of this message | ||
On Wed Apr 23, 2003 at 11:5814AM +0200, Wolfram Kriesing wrote:
> Lukas Smith wrote:
> >2) make singleton optional: MDB::singleton($dsn, $options)
>
> am i right that PEAR defines the method, which gets you a singleton
> instance is called "singleton"?
> I am just asking to get a clear definition, since we are trying to
> make some common method names unique here, right?
> If there is no definition yet, i might suggest "getInstance", but that
> is just a personal preference.
I guess we should stick to singleton(), as this is used at a lot of
places on PEAR already. If it comes to the Factory pattern, the method
name should be factory().
--
- Martin Martin Jansen
http://martinjansen.com/