1
0
mirror of synced 2025-01-18 06:21:40 +03:00

testing conversion to wiki markup script

This commit is contained in:
legenerationlazi 2007-04-13 19:32:57 +00:00
parent 8b95e7e719
commit c4ca59647d

View File

@ -1,22 +1,21 @@
<?php ?> <?php ?>
<ul>
<li \>Methods must be named by following the naming conventions.
</ul>
<ul>
<li \>Methods must always declare their visibility by using one of the private, protected, or public constructs.
</ul>
<ul>
<li \>Like classes, the brace is always written right after the method name. There is no space between the function name and the opening parenthesis for the arguments.
</ul>
<ul>
<li \>Functions in the global scope are strongly discouraged.
</ul>
<ul>
<li \>This is an example of an acceptable function declaration in a class:
</ul>
<?php * Methods must be named by following the naming conventions.
renderCode("<?php
* Methods must always declare their visibility by using one of the private, protected, or public constructs.
* Like classes, the brace is always written right after the method name. There is no space between the function name and the opening parenthesis for the arguments.
* Functions in the global scope are strongly discouraged.
* This is an example of an acceptable function declaration in a class:
<code type="php">
/** /**
* Documentation Block Here * Documentation Block Here
*/ */
@ -28,14 +27,11 @@ class Foo {
// entire content of function // entire content of function
// must be indented four spaces // must be indented four spaces
} }
}"); }</code>
?> * Passing by-reference is permitted in the function declaration only:
<ul>
<li \>Passing by-reference is permitted in the function declaration only: <code type="php">
</ul>
<?php
renderCode("<?php
/** /**
* Documentation Block Here * Documentation Block Here
*/ */
@ -46,16 +42,14 @@ class Foo {
public function bar(&\$baz) { public function bar(&\$baz) {
} }
} }
"); </code>
?>
<ul> * Call-time pass by-reference is prohibited.
<li \>Call-time pass by-reference is prohibited.
</ul>
<ul> * The return value must not be enclosed in parentheses. This can hinder readability and can also break code if a method is later changed to return by reference.
<li \>The return value must not be enclosed in parentheses. This can hinder readability and can also break code if a method is later changed to return by reference.
</ul> <code type="php">
<?php
renderCode("<?php
/** /**
* Documentation Block Here * Documentation Block Here
*/ */
@ -72,29 +66,24 @@ class Foo {
public function bar() { public function bar() {
return \$this->bar; return \$this->bar;
} }
}"); }</code>
?>
<ul> * Function arguments are separated by a single trailing space after the comma delimiter. This is an example of an acceptable function call for a function that takes three arguments:
<li \>Function arguments are separated by a single trailing space after the comma delimiter. This is an example of an acceptable function call for a function that takes three arguments:
</ul> <code type="php">
<?php
renderCode("<?php
threeArguments(1, 2, 3); threeArguments(1, 2, 3);
?>"); ?></code>
?>
<ul> * Call-time pass by-reference is prohibited. See the function declarations section for the proper way to pass function arguments by-reference.
<li \>Call-time pass by-reference is prohibited. See the function declarations section for the proper way to pass function arguments by-reference.
</ul>
<ul> * For functions whose arguments permitted arrays, the function call may include the "array" construct and can be split into multiple lines to improve readability. In these cases, the standards for writing arrays still apply:
<li \>For functions whose arguments permitted arrays, the function call may include the "array" construct and can be split into multiple lines to improve readability. In these cases, the standards for writing arrays still apply:
</ul> <code type="php">
<?php
renderCode("<?php
threeArguments(array(1, 2, 3), 2, 3); threeArguments(array(1, 2, 3), 2, 3);
threeArguments(array(1, 2, 3, 'Framework', threeArguments(array(1, 2, 3, 'Framework',
'Doctrine', 56.44, 500), 2, 3); 'Doctrine', 56.44, 500), 2, 3);
?>"); ?></code>
?>