Pear coding standards doubts
Following Pear Coding Standards:
- Should I use
_
before private methods or just for private properties? - Should I us开发者_开发知识库e
methodName
ormethod_name
for methods? - Should I use
public $fooBar
orpublic $foo_bar
?
Thank you.
Should I use
_
before private methods or just for private properties?
Use _
before all private member names. This includes properties and methods.
Should I use
methodName
ormethod_name
for methods?
Use camel case (that means methodName
).
Should I use "public $fooBar" or "public $foo_bar" ?
Separate words with underscores (that means $foo_bar
).
Some of these are mentioned in the Class Variables and Methods section of the PEAR naming conventions document.
精彩评论