Package/Class naming conventions in PEAR
| From: | Jesus M. Castagnetto | Date: | Tue, 10 Apr 2001 17:03:02 +0000 |
| Subject: | Package/Class naming conventions in PEAR | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-199@lists.php.net to get a copy of this message | ||
I just commited the Science/Chemistry package to pear
on cvs.php.net, and after I did that I got to think
about putting the naming conventions more explicitely
in the "CODING_STANDARDS" file.
I am using the convention that: Science/Chemistry
translates into "@package Science_Chemistry" in the
documentation
Should we also enforce that the classes are name
accordingly? (I am not following this in the package I
just commited). What I mean is that if we have the
"Atom" class in the aforementioned package, perhaps I
should be using: Science_Chemistry_Atom instead of
Chem_Atom as the class name.
This will be consistent w/ the constant naming
recomendation that we now have in the
"CODING_STANDARDS" file, and also be useful because
PHP does not have namespaces.
Opinions/Comments?
As an aside, PHPDoc *still* mangles the documentation,
if you define an optional parameter to be an array or
object in the docs, PHPDoc still looks at the function
def and generates the wrong docs. As you can only use
scalars as initializing values in functions
definitions, this is not a good thing to do.
=====
--- Jesus M. Castagnetto (jcastagnetto@yahoo.com)
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/