Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Daniel Klein
February 5, 2008, 12:46 am
rate this thread
the classes I'm developing will not clash with someone else's code?
For now I'm making the class names as 'unique' as possible without losing
the 'intention revealing' aspect of the names.
Are namespaces on the php horizon?
[ ps I found (via a google search) a 'namespace petition'.
It is asking for my email address. Is this site above board? ]
There's a PEAR class naming convention:
This however will obviously not cover all, as it's clear more
natural/logical choices will be used more often by different codes.
For code clearly written for multiple uses / as a module in other code, I
normally think of a package name, and name all classes:
<package_name>_<logical_class_name> (so something like class
Yup, there's been some toying around with it in the past, and
implementation seems to be going in PHP5.3 (as will some other OO stuff,
like late static binding)
None that is commonly used. Some developers just ignore the issue,
others prefix "intention-revealing" names with the developer's
(corporate or personal) initials and/or shortened product name.
Namespaces are available as of PHP 5.3.0 (currently in CVS) on an