Skip to content

Commit

Permalink
Describe the standards for function naming and private methods.
Browse files Browse the repository at this point in the history
jparise committed Jul 17, 2001
1 parent c75f153 commit 36868ff
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pear/CODING_STANDARDS
Original file line number Diff line number Diff line change
@@ -123,6 +123,18 @@ function connect(&$dsn, $persistent = false)
return true;
}

Functions should be named using the "studly caps" style (also referred to as
"bumpy case" or "camel caps". The initial letter of the name is lowercase,
and each letter that starts a new "word" is capitalized. Some examples:

connect() getData() buildSomeWidget()

Private methods (meaning methods that an intented to be called only from
within the same class; PHP does not yet support truly-enforceable private
namespaces) are preceeded by a single underscore. For example:

_sort() _initTree() _validateInput()


------------
[5] Comments

0 comments on commit 36868ff

Please sign in to comment.