This repository has been archived by the owner on Jan 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Naming & Other Conventions
Jon Stockton edited this page Aug 11, 2014
·
4 revisions
- 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
- 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
- The filename should be the class name in all lowercase and have a .class.php extension
- These are stored in includes/classes/
- 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