Re: Re: Scope woe

From: Date: Tue, 30 Jun 2009 16:37:36 +0000
Subject: Re: Re: Scope woe
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-294752@lists.php.net to get a copy of this message
On Tue, Jun 30, 2009 at 11:17:17AM -0400, Eddie Drapkin wrote: <snip> > > I wouldn't really recommend going with a singleton in this situation, > as there exists a different solution (my other post :P) and there are > very few actual use-cases where the pattern makes sense, and deploying > it unnecessarily can cause a whole lot of headache D: > I disagree. A singleton is quite a good solution, particularly when you only want one instance of an object. You can also create a "registry" class which contains instances of objects which might be useful to other classes. Why would a singleton lead to headaches? Paul -- Paul M. Foster

« previous php.general (#294752) next »