Changes between Initial Version and Version 1 of doc/developer/CodingStandard

03/27/06 11:00:34 (15 years ago)



  • doc/developer/CodingStandard

    v1 v1  
     3Max Horváth, Benoit Grégoire, last revision: [[Timestamp]] 
     4= PHP Coding standards = 
     6 * The coding style for the Auth server is the Zend Framework coding standard: 
     7 * Note that the Zend Framework coding standard is mostly a more readable superset of the PEAR coding standard: 
     9== Exceptions == 
     10 *  Source files in wifidog use UTF-8 character encoding - not ISO-8859-1 character encoding. 
     12== Summary == 
     13 * use an indent of 4 spaces, with no tabs 
     14 * Naming of variables and functions is camelBack 
     15 * Naming of classes is CamelBack with starting capital, and underscore separated path separator: 
     16  * Content_TrivialLangstring 
     17 * Private and protected members start with an underscore: 
     18  * private *_privateMember 
     19  * private _privateMethod() 
     20 * control statements should have one space between the control keyword and opening parenthesis, to distinguish them from function calls 
     21 * you are strongly encouraged to always use curly braces even in situations where they are technically optional 
     22 * functions should be called with no spaces between the function name, the opening parenthesis, and the first parameter; spaces between commas and each parameter, and no space between the last parameter, the closing parenthesis, and the semicolon 
     23 * complete inline documentation comment blocks (docblocks) must be provided 
     24 * include the $Id$ CVS keyword in each file. As each file is edited, add this tag if it's not yet present (or replace existing forms such as "Last Modified:", etc.) 
     26= C Coding standards = 
     27To be written...