RE: [PHP] OO and "Singleton" class

2009-09-02 Thread Andrea Giammarchi
Maybe somebody would be interested in my solution as well: http://webreflection.blogspot.com/2009/09/php-53-singleton-fast-and-abstract.html Regards > Date: Wed, 2 Sep 2009 14:02:25 +0900 > From: koy...@hoge.org > To: php-general@lists.php.net > Subject: Re: [PHP] OO and "

Re: [PHP] OO and "Singleton" class

2009-09-01 Thread KOYAMA Tetsuji
Hi, After PHP 5.3, there is better implements for Singleton. http://d.hatena.ne.jp/Yudoufu/20090811/1250021010 This entry was written by Japanese, but you may understand php code. :-) On Wed, Sep 2, 2009 at 07:06, Eddie Drapkin wrote: > On Tue, Sep 1, 2009 at 5:16 PM, Paul M Foster wrote: >> >>

Re: [PHP] OO and "Singleton" class

2009-09-01 Thread Paul M Foster
On Tue, Sep 01, 2009 at 06:06:24PM -0400, Eddie Drapkin wrote: > On Tue, Sep 1, 2009 at 5:16 PM, Paul M Foster wrote: > > > > I'm a little fuzzy on some of the PHP implementation details for some > > stuff. In PHP (5 <= phpversion() < 5.3), I'd like a configuration class > > which can only effecti

Re: [PHP] OO and "Singleton" class

2009-09-01 Thread Eddie Drapkin
On Tue, Sep 1, 2009 at 5:16 PM, Paul M Foster wrote: > > I'm a little fuzzy on some of the PHP implementation details for some > stuff. In PHP (5 <= phpversion() < 5.3), I'd like a configuration class > which can only effectively be instantiated once. Will the following code > do this? Any other su

[PHP] OO and "Singleton" class

2009-09-01 Thread Paul M Foster
I'm a little fuzzy on some of the PHP implementation details for some stuff. In PHP (5 <= phpversion() < 5.3), I'd like a configuration class which can only effectively be instantiated once. Will the following code do this? Any other suggestions or corrections? (Code is untested. Feel free to comp