Re: Re: Scope woe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux