Skip to content
This repository has been archived by the owner on Jan 18, 2019. It is now read-only.

Naming & Other Conventions

Jon Stockton edited this page Aug 11, 2014 · 4 revisions

Branches

Issue Branch Names

Module Branch Names

Theme Branch Names

Database

File-names

Table & Column Names

Primary Keys

Query Syntax Requirements

Storage Location

Helper Classes

Class Names

  • Should describe the overall purpose of the class - ex: SimpleFile for file manipulation
  • Maintain upper-camel-case style - ex: SimpleDirectory
  • Capitalize abbreviations in class names - ex: SimpleDB

Function Names

  • Shoud be camel-case style - ex: getContent()
  • Should contain a private logDebug() function which appends to a static associative array of debug messages (named anything) with the key being the timstamp of the message and the value being the message itself
  • Should contain a public getDebug() function which returns the associative array

File Names

  • The filename should be the class name in all lowercase and have a .class.php extension

Storage Location

  • These are stored in includes/classes/

Other Requirements

  • Should not rely on any other classes to function
  • Should not directly output any information; the exception being if you are actively debugging the script, afterwards output should be removed

Modules

Archive Structures

File Names

DB Table Names

Themes

Archive Structure

File Names

CSS Class Names

JavaScript Class Names

Widgets

File Names