From: "Morgan Christiansson" <[EMAIL PROTECTED]> > Hi, what is the standard for function naming in docbook? > > It's basically saying this in the various docs: > > Comply with pear standards but you must use lowercase. > And pear standards say use getSettings instead of get_settings. > And phpdoc standards say getsettings instead of getSettings. > > So what should it be? > > Can i use all lowercase in ID="function.functionname" and > <function>functionName</function> and <refname>functionName</refname> etc.? > > Or should i break the pear naming standards? > > the phpdoc/howto.html.tar.gz/howto/html/chapter-conventions.html says: > > "Function reference IDs look like this (case should be consistent with > the rest of the function naming standards, i.e. lowercase): > function.imageloadfont. Please note that since underscores cannot be > used in IDs, they should be replaced by minus signs (-)." > > http://php.net/manual/en/pear.standards.naming.php say: > > "Functions and methods should be named using the "studly caps" style > (also referred to as "bumpy case" or "camel caps"). Functions should in > addition have the package name as a prefix, to avoid name collisions > between packages. The initial letter of the name (after the prefix) is > lowercase, and each letter that starts a new "word" is capitalized. Some > examples:"
We donī t use the rules written in some PEAR standards. If you want document some undocumented functions, you have to use the function name AS IS from the source code. The preferred naming scheme is prefix_get_settings. Only the ID attribute should have minus signs instead of underscores. -Egon