diff --git a/manual/codes/Coding standards - Coding Style - Arrays.php b/manual/codes/Coding standards - Coding Style - Arrays.php new file mode 100644 index 000000000..28cf67d53 --- /dev/null +++ b/manual/codes/Coding standards - Coding Style - Arrays.php @@ -0,0 +1,12 @@ + 'firstValue', + 'second' => 'secondValue'); + diff --git a/manual/codes/Coding standards - Coding Style - Classes.php b/manual/codes/Coding standards - Coding Style - Classes.php new file mode 100644 index 000000000..587d8f9c0 --- /dev/null +++ b/manual/codes/Coding standards - Coding Style - Classes.php @@ -0,0 +1,8 @@ + diff --git a/manual/codes/Coding standards - Naming Conventions - Filenames.php b/manual/codes/Coding standards - Naming Conventions - Filenames.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/codes/Coding standards - Naming Conventions - Functions and methods.php b/manual/codes/Coding standards - Naming Conventions - Functions and methods.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/codes/Coding standards - Naming Conventions - Interfaces.php b/manual/codes/Coding standards - Naming Conventions - Interfaces.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/codes/Coding standards - Naming Conventions - Record columns.php b/manual/codes/Coding standards - Naming Conventions - Record columns.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/codes/Coding standards - Naming Conventions - Variables.php b/manual/codes/Coding standards - Naming Conventions - Variables.php new file mode 100644 index 000000000..d3f5a12fa --- /dev/null +++ b/manual/codes/Coding standards - Naming Conventions - Variables.php @@ -0,0 +1 @@ + diff --git a/manual/codes/Coding standards - Overview - Goals.php b/manual/codes/Coding standards - Overview - Goals.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/codes/Coding standards - Overview - Scope.php b/manual/codes/Coding standards - Overview - Scope.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/docs/Advanced components - Eventlisteners - AccessorInvoker.php b/manual/docs/Advanced components - Eventlisteners - AccessorInvoker.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/docs/Basic Components - Record - Checking Existence.php b/manual/docs/Basic Components - Record - Checking Existence.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/docs/Coding standards - Coding Style - Arrays.php b/manual/docs/Coding standards - Coding Style - Arrays.php new file mode 100644 index 000000000..4eafdf10b --- /dev/null +++ b/manual/docs/Coding standards - Coding Style - Arrays.php @@ -0,0 +1,15 @@ + + + + + diff --git a/manual/docs/Coding standards - Coding Style - Classes.php b/manual/docs/Coding standards - Coding Style - Classes.php new file mode 100644 index 000000000..6951fc07e --- /dev/null +++ b/manual/docs/Coding standards - Coding Style - Classes.php @@ -0,0 +1,21 @@ + + + + + + +This is an example of an acceptable class declaration: + + diff --git a/manual/docs/Coding standards - Coding Style - Control statements.php b/manual/docs/Coding standards - Coding Style - Control statements.php new file mode 100644 index 000000000..164cea7b9 --- /dev/null +++ b/manual/docs/Coding standards - Coding Style - Control statements.php @@ -0,0 +1,75 @@ + + + + + + + + + + + + +"); +?> + diff --git a/manual/docs/Coding standards - Coding Style - Functions and methods.php b/manual/docs/Coding standards - Coding Style - Functions and methods.php new file mode 100644 index 000000000..32aabcb2e --- /dev/null +++ b/manual/docs/Coding standards - Coding Style - Functions and methods.php @@ -0,0 +1,99 @@ + + + + + + + + + + + + +bar); + } + /** + * RIGHT + */ + public function bar() { + return \$this->bar; + } +}"); +?> + +"); +?> + + +"); +?> + diff --git a/manual/docs/Coding standards - Coding Style - Inline documentation.php b/manual/docs/Coding standards - Coding Style - Inline documentation.php new file mode 100644 index 000000000..ee680961f --- /dev/null +++ b/manual/docs/Coding standards - Coding Style - Inline documentation.php @@ -0,0 +1,35 @@ +Documentation Format + + +Methods: + + + + + + + + + + + + + + + diff --git a/manual/docs/Coding standards - Coding Style - PHP code demarcation.php b/manual/docs/Coding standards - Coding Style - PHP code demarcation.php new file mode 100644 index 000000000..673505441 --- /dev/null +++ b/manual/docs/Coding standards - Coding Style - PHP code demarcation.php @@ -0,0 +1,4 @@ +PHP code must always be delimited by the full-form, standard PHP tags () + +Short tags are never allowed. For files containing only PHP code, the closing tag must always be omitted + diff --git a/manual/docs/Coding standards - Coding Style - Strings.php b/manual/docs/Coding standards - Coding Style - Strings.php new file mode 100644 index 000000000..bb016d70d --- /dev/null +++ b/manual/docs/Coding standards - Coding Style - Strings.php @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/manual/docs/Coding standards - Naming Conventions - Classes.php b/manual/docs/Coding standards - Naming Conventions - Classes.php new file mode 100644 index 000000000..bc5a24b01 --- /dev/null +++ b/manual/docs/Coding standards - Naming Conventions - Classes.php @@ -0,0 +1,13 @@ + + + diff --git a/manual/docs/Coding standards - Naming Conventions - Constants.php b/manual/docs/Coding standards - Naming Conventions - Constants.php new file mode 100644 index 000000000..4d0e67a1b --- /dev/null +++ b/manual/docs/Coding standards - Naming Conventions - Constants.php @@ -0,0 +1,10 @@ +Following rules must apply to all constants used within Doctrine framework: + + + + + + + diff --git a/manual/docs/Coding standards - Naming Conventions - Filenames.php b/manual/docs/Coding standards - Naming Conventions - Filenames.php new file mode 100644 index 000000000..7dbebdd9c --- /dev/null +++ b/manual/docs/Coding standards - Naming Conventions - Filenames.php @@ -0,0 +1,14 @@ + + + + diff --git a/manual/docs/Coding standards - Naming Conventions - Functions and methods.php b/manual/docs/Coding standards - Naming Conventions - Functions and methods.php new file mode 100644 index 000000000..5511f1b7f --- /dev/null +++ b/manual/docs/Coding standards - Naming Conventions - Functions and methods.php @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/manual/docs/Coding standards - Naming Conventions - Interfaces.php b/manual/docs/Coding standards - Naming Conventions - Interfaces.php new file mode 100644 index 000000000..5ef9578fc --- /dev/null +++ b/manual/docs/Coding standards - Naming Conventions - Interfaces.php @@ -0,0 +1,9 @@ + diff --git a/manual/docs/Coding standards - Naming Conventions - Record columns.php b/manual/docs/Coding standards - Naming Conventions - Record columns.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/docs/Coding standards - Naming Conventions - Variables.php b/manual/docs/Coding standards - Naming Conventions - Variables.php new file mode 100644 index 000000000..32b107b20 --- /dev/null +++ b/manual/docs/Coding standards - Naming Conventions - Variables.php @@ -0,0 +1,13 @@ +All variables must satisfy the following conditions: + + + + + + diff --git a/manual/docs/Coding standards - Overview - Goals.php b/manual/docs/Coding standards - Overview - Goals.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/docs/Coding standards - Overview - Scope.php b/manual/docs/Coding standards - Overview - Scope.php new file mode 100644 index 000000000..e69de29bb diff --git a/manual/docs/Coding standards - PHP File Formatting - General.php b/manual/docs/Coding standards - PHP File Formatting - General.php new file mode 100644 index 000000000..5b095b690 --- /dev/null +++ b/manual/docs/Coding standards - PHP File Formatting - General.php @@ -0,0 +1,4 @@ +For files that contain only PHP code, the closing tag ("?>") is never permitted. It is not required by PHP. Not including it prevents trailing whitespace from being accidentally injected into the output. +

+IMPORTANT: Inclusion of arbitrary binary data as permitted by __HALT_COMPILER() is prohibited from any Zend framework PHP file or files derived from them. Use of this feature is only permitted for special installation scripts. + diff --git a/manual/docs/Coding standards - PHP File Formatting - Indentation.php b/manual/docs/Coding standards - PHP File Formatting - Indentation.php new file mode 100644 index 000000000..dcc2bc522 --- /dev/null +++ b/manual/docs/Coding standards - PHP File Formatting - Indentation.php @@ -0,0 +1 @@ +Use an indent of 4 spaces, with no tabs. diff --git a/manual/docs/Coding standards - PHP File Formatting - Line termination.php b/manual/docs/Coding standards - PHP File Formatting - Line termination.php new file mode 100644 index 000000000..b0a8fdda3 --- /dev/null +++ b/manual/docs/Coding standards - PHP File Formatting - Line termination.php @@ -0,0 +1,9 @@ + + + diff --git a/manual/docs/Coding standards - PHP File Formatting - Maximum line length.php b/manual/docs/Coding standards - PHP File Formatting - Maximum line length.php new file mode 100644 index 000000000..390c03d59 --- /dev/null +++ b/manual/docs/Coding standards - PHP File Formatting - Maximum line length.php @@ -0,0 +1 @@ +The target line length is 80 characters, i.e. developers should aim keep code as close to the 80-column boundary as is practical. However, longer lines are acceptable. The maximum length of any line of PHP code is 120 characters. diff --git a/manual/documentation.php b/manual/documentation.php index 6ee7d1077..9183af56b 100644 --- a/manual/documentation.php +++ b/manual/documentation.php @@ -44,7 +44,7 @@ function render($title,$t,$e) { } function render_block($name) { - $h = new PHP_Highlight; + if(file_exists("docs/$name.php")) { $c = file_get_contents("docs/$name.php"); if(substr($c,0,5) == "loadString($c); print ""; @@ -65,7 +70,6 @@ function render_block($name) { print $h->toHtml(); print ""; print "
"; - } } } function array2path($array, $path = '') { @@ -110,6 +114,7 @@ $menu = array("Getting started" => "Composite", "Sequential") ), + /** "Schema reference" => array( "Data types" => array( @@ -128,6 +133,7 @@ $menu = array("Getting started" => ), ), + */ "Basic Components" => array( "Manager" @@ -368,7 +374,42 @@ $menu = array("Getting started" => "INSERT", "UPDATE"), ), - "Real world examples" => array("User management system","Forum application","Album lister") + "Real world examples" => array("User management system","Forum application","Album lister"), + + "Coding standards" => array( + "Overview" => + array( + "Scope", + "Goals" + ), + "PHP File Formatting" => array( + "General", + "Indentation", + "Maximum line length", + "Line termination" + ), + + "Naming Conventions" => array( + "Classes", + "Interfaces", + "Filenames", + "Functions and methods", + "Variables", + "Constants", + "Record columns", + ), + + + "Coding Style" => array( + "PHP code demarcation", + "Strings", + "Arrays", + "Classes", + "Functions and methods", + "Control statements", + "Inline documentation" + ), + ) ); @@ -409,12 +450,12 @@ $menu = array("Getting started" => if( ! file_exists("docs/$title - $k - $v2.php")) { $missing[0]++; $str .= " [ doc ] "; - //touch("docs/$title - $k - $v2.php"); + touch("docs/$title - $k - $v2.php"); } if( ! file_exists("codes/$title - $k - $v2.php")) { $missing[1]++; $str .= " [ code ] "; - //touch("codes/$title - $k - $v2.php"); + touch("codes/$title - $k - $v2.php"); } @@ -427,12 +468,12 @@ $menu = array("Getting started" => if( ! file_exists("docs/$title - $t.php")) { $missing[0]++; $str .= " [ doc ] "; - //touch("docs/$title - $t.php"); + touch("docs/$title - $t.php"); } if( ! file_exists("codes/$title - $t.php")) { $missing[1]++; $str .= " [ code ] "; - //touch("codes/$title - $t.php"); + touch("codes/$title - $t.php"); } print "
".$e." ".$t."$str
\n"; }