mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 06:38:00 +02:00
Updated e107 Coding Standard (markdown)
@@ -46,8 +46,13 @@ Use BSD/Allman/Pascal style - opening '{' on a new line. The only exception is f
|
||||
|
||||
[PSR-1](https://www.php-fig.org/psr/psr-1/) is used with the exception of class/method naming (see below).
|
||||
|
||||
## Variables
|
||||
Use **camelCase** naming.
|
||||
|
||||
$myVariable = "whatever";
|
||||
|
||||
## Constants
|
||||
Use UPPER_CASE_WITH_UNDERSCORES for constants.
|
||||
Use **UPPER_CASE_WITH_UNDERSCORES** for constants.
|
||||
|
||||
define("CONSTANT_NAME", "some value");
|
||||
|
||||
@@ -103,6 +108,8 @@ One example: use the e107 file-class instead of PHP file functions to read direc
|
||||
$filesArray = $fl->get_files($path, $fmask);
|
||||
|
||||
## Paths
|
||||
File names must be all lowercase.
|
||||
|
||||
Use the e_XXX path constants to refer to directories:
|
||||
Absolute constants (e_XXX_ABS) for paths within HTML pages
|
||||
Relative paths (e_XXX) to access files from within the code
|
||||
|
Reference in New Issue
Block a user