Welcome to the phpDocumentor Manual! Please refer to the HOWTO for an overview of the usage of phpDocumentor.
phpDocumentor tags are very similar to tags for the JavaDoc tool for Sun's Java Programming Language. Tags are only parsed if they are the first thing on a new line of a DocBlock. You may use the @ character freely throughout documents as long as it does not begin a new line. An example:
/** * tags demonstration * @author this tag is parsed, but this @version tag is ignored * @version 1.0 this version tag is parsed */ |
Any tags that phpDocumentor does not recognize will not be parsed, and will be displayed in text flow as if they are part of the DocBlock long description. The example below displays text "tags demonstration @foobar this is silly," and also displays the author as "this tag is parsed, but this @version tag is ignored"
/** * tags demonstration * @foobar this is silly * @author this tag is parsed, but this @version tag is ignored */ |
Inline tags display in the text flow where they appear, and are not separated from the description. Currently only one inline tag, {@link}, is implemented, but more may be implemented in the future. See inline {@link} for more information.
The example below will display the text "this function works heavily with foo() to rule the world" where foo() represents a hyperlink that links to the function foo()'s documentation.
/** * inline tags demonstration * * this function works heavily with {@link foo()} to rule the world */ function bar() { } function foo() |
@package Document a collection of elements
@subpackage Document a sub-collection of elements
@access Specify whether an element should be parsed or not
@ignore ignore an element
@version Display version information for an element
@author Display author information
@copyright Display Copyright information
@since Display Information on which version an element was introduced to a project
@deprecated Deprecate an element
@return Describe the return value of a function
@var Document the data type of a class variable
@param Describe a parameter of a function
@global Document global variable definition or use
@staticvar Document static variable use in a function
@name Set an alias for a procedural page or global variable
@link Display a hyperlink
@see Display a link to an element's documentation
inline {@link} Display a hyperlink or a link to an element's documentation in the natural text flow
inline {@id} Used to control XML package page ids in refsects
inline {@inheritdoc} Used to directly inherit the long description from the parent class in child classes
inline {@source} Display highlighted source code of a function, complete or an excerpt
Prev | Home | Next |
Home | Up | Package |
Tag Documentation written by Gregory Beaver <cellog@users.sourceforge.net>
Copyright © 2002, Gregory Beaver