Re: Static utility class?

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

 



On Wed, Sep 4, 2013 at 11:07 PM, Robert Cummings <robert@xxxxxxxxxxxxx> wrote:
> I'll second Rodrigo's opinion, but would like to comment that the name of
> the class is misleading since it's called "Singleton". The singleton pattern
> is used when you only ever want one instantiation of a class. In your case
> you are using static methods, the object never needs to be instantiated and
> so it doesn't fit this pattern. What you are creating is far more consistent
> with the utility pattern.

Ahhh, thanks so much for the clarification and details! That's very helpful.

I've updated my gist to reflect the pattern name:

<https://gist.github.com/mhulse/6441525>

Much appreciated. :)

-- 
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