::home::
PHP
- Namespace naming
- Class naming
- Method naming
- Attribute naming
- Private prefix
- Static prefix
- Pointer/Reference prefix
- Constant prefix
Namespace naming.
- Namespace layout SHOULD follow PSR-4 recommendations.
Example:
namespace CORP\%WHATEVER%
/**
* Class doc
*/
class MyClass {
Class naming.
- Class names SHOULD be a spaceless list of ALMOST ALWAYS capitalised descriptive Nouns (and Conjunctives.)
- Class names MUST start with a capital letter.
- Class names SHOULD use a capital letter to denote the start of joined words.
- Class names SHOULD NOT contain verbs.
- Class names SHOULD be given in their __gender neutral__ form.
- Class names SHOULD be given in their __singular__ form.
Example:
namespace sprites\Genelogy;
/**
* Class doc
*/
class HumanBeing {