Re: [PEPr] +1 for Authentication::OpenID

From: Date: Thu, 09 Feb 2006 17:26:02 +0000
Subject: Re: [PEPr] +1 for Authentication::OpenID
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-41269@lists.php.net to get a copy of this message
One more question: On 9 Feb 2006 09:22:16 -0000, Markus Tacker <m@tacker.org> wrote: > * Implementing functions as methods Should we just create an arbitrary class (like Auth_OpenID) and dump all of the functions in it? The functions that we have that are not methods are not related to each other and do not naturally go in a particular class. For example should: function Auth_OpenID_saneTrustRoot(...) { ... } be converted to: class Auth_OpenID_TrustRoot { /** * @static */ function isSane(...) { ... } } or: class Auth_OpenID { /** * @static */ function saneTrustRoot(...) { ... } } I don't know if this is even debatable, but I always feel uneasy about a class that will never be instantiated. It seems like asking for trouble. (What would it mean if someone instantiated it? I know the answer is "don't do that", but making it a function instead of a static method makes it so you *can't* do that.) Josh

« previous php.pear.dev (#41269) next »