From 83daa7c8072c6e60bd8548559268f55a8b0d2717 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 25 May 2020 12:09:24 -0700 Subject: [PATCH] Updated e107 Coding Standard (markdown) --- e107-Coding-Standard.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/e107-Coding-Standard.md b/e107-Coding-Standard.md index dc69795..1e95dd2 100644 --- a/e107-Coding-Standard.md +++ b/e107-Coding-Standard.md @@ -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