jeroen Sun Aug 12 17:32:35 2001 EDT
Modified files:
/phpdoc README
Log:
More conventions
Index: phpdoc/README
diff -u phpdoc/README:1.16 phpdoc/README:1.17
--- phpdoc/README:1.16 Sun Aug 12 11:52:05 2001
+++ phpdoc/README Sun Aug 12 17:32:35 2001
@@ -97,8 +97,31 @@
for each level of indentation; example code uses four spaces.
13. Types: In the docs, the types are denoted as: boolean (also in
- paramdefs), integer (int in paramdefs), float (not: double),
+ prototypes), integer (int in prototypes), float (not: double),
array, object (not: class), resource and null (lowercase).
+
+ In prototypes, you can also use 'mixed' (various types), or 'number'
+ (either integer or float), or scalar (boolean, integer, float or
+ string). A callback is denoted as mixed(*), since it can be either
+ array or string.
+
+ If a function requires no arguments, use <void/> in stead of
+ <parameter>void</parameter>, since the former renders to " ()",
+ and not " (void)", the former is of course more correct.
+
+ If a function has an undefined return-value, use 'void'.
+
+ 14. In a prototype, if there are multiple - really distinct -
+ possibilities, simply make it two! See math.xml:min() for an example.
+
+ 15. Aliases: In refpurpose, put: Alias of <function>realfunc</function>.
+ Do _not_ specify a funcsynopsis, and nothing but simply
+ the text: This function is an alias of <function>realfunc</function>.
+
+ This way, people can click to realfunc straight from the ref.foo page.
+
+ (*) Better suggestions? I don't really like it this way... not simply
+ 'function', or something alike? --Jeroen
WHAT TO DOCUMENT