Previous | Up | Next |
@filesource | phpDocumentor tags | @ignore |
Since there is no standard way to declare global variables, phpDocumentor requires that a @global tag be used in a docblock preceding a global variable's definition. To support previous usage of @global, there is an alternate syntax that applies to DocBlocks preceding a function, used to document usage of global variables. in other words, There are two usages of @global: definition and function usage.
phpDocumentor will not attempt to automatically parse out any global variables. Only one @global tag is allowed per global variable DocBlock. A global variable DocBlock must be followed by the global variable's definition before any other element or DocBlock occurs in the source, or an error will be raised.
datatype should be a valid PHP type or "mixed."
$varname should be the EXACT name of the global variable as it is declared in the source (use @name to change the name displayed by documentation)
The function/method @global syntax is used to document usage of global variables in a function, and MUST NOT have a $ starting the third word. The datatype will be ignored if a match is made between the declared global variable and a variable documented in the project.
phpDocumentor will check to see if the type specified is the name of a class that has been parsed. If so, it will make a link to that class as the type instead of just the type.
phpDocumentor will display the optional description unmodified
Here's an example of documenting the definition of a global variable:
Here's an example of documenting the use of a global variable in a function/method:
Previous | Up | Next |
@filesource | phpDocumentor tags | @ignore |
Documentation generated on Mon, 05 Dec 2011 21:29:48 -0600 by phpDocumentor 1.4.4