Developer's Guide
Objects / Classes
1. Object name must be singular
2.
3. class Customer
4. Class name must follow the CamelCase practice except that the first
letter is uppercase
5.
6. class MyBeautifulClass
Defines
1. Define names must be written in uppercase
2. Define names have to be prefixed by "PS_" inside the core and
module
3.
4. define('PS_DEBUG', 1);
5. define('PS_MODULE_NAME_DEBUG', 1);
6. Define names does not allow none alphabetical characters. Except
“_”.
Keywords
All keywords have to be lowercase
e.g. as, case, if, echo, null
Constants
Constants must be uppercase except for "true" and "false" and “null”
which must be lowercase
e.g. "ENT_NOQUOTE", "true"
Configuration variables
Configuration variables follow same rules as defines
Strings
Strings have to be surrounded by simple quotes, never double ones
echo 'Debug';
$myObj->name = 'Hello '.$name;
Comments
1. Inside functions and methods, only the "//" comment tag is allowed
2. After the "//" comment tag, a space “// Comment“ is required
3.
4. // My great comment
5. The "//" comment tag is tolerated at the end of a code line
6.