You are on page 1of 2

phpDocumentator tags Quick Guide

by Đonny
Standard tags
@abstract @internal @return
@abstract @internal non-public @return datatype['|'datatype]+
Class, class variable, method is abstract. information description
PHP4 only Text in this directive is displayed only Return value of function. Any dada type
@access for documentation created with or mixed is allowed.
@access {private | protected | command demanding it @returns
public} @license @return datatype['|'datatype]+
Access of member how @license URL name description
phpDocumentator understands it Links to license information and gives Alias to @return for compatibility
@author name of the license @see
@author Author name @link @see
<author@email> @link URL text file.ext|elementname|class::me
Author of element with optional @-mail @link URL [, URL]+ thodname()|class::$varname|fun
in <> Link to URL ctionname
@category @method [,file.ext|elementname|class::
@category CategoryName @method returntype name() methodname()|class::$varname|f
Specifies a category to organize description unctionname]+
documented element's package into Documents magic method the class Link to documentation of another
contains (method not present on class but element
@copyright
@copyright copyright callable via __call magic function. @since
information @name @since version | info string
Copyright information e.g. Copyright © @name $globalvariablename When (in which version) was element
ðonny 2007 Alias for procedural page or global added to package
@deprecated variable used as display-name in @static
@deprecated version | info documentation. @static
string @package Documents variable or function as static
Marks element as deprecated (may be @package name @staticvar
removed in future version). String after Name of packege. Used to grouping @staticvar datatype
tag is not parsed. classes, functions and defines. description
@example @param Used for static variable inside a function.
@example relativepath @param datatype['|'datatype]+ Datatype can be any PHP type or
description $paramname[,…] description 'mixed'.
Includes external example file with Documentation for function parameter. @subpackage
syntax highlighting. Path can be any path Any valid PHP datatype or 'mixed' is @subpackage name
acceptable by fopen. allowed. ,… specifies that the parameter Specifies sub-package to group classes,
@final is not just only one but multiple functions and defines into. Requires
@final parameters. Also parameters that are @package.
physically not present can be
Class method that is final (not
documented (if you use
@todo
overridable). PHP4 only. @todo string
get_func_arg())
@filesource @property
Change that'll be made in the future
@filesource
@property [datatype] $name
@tutorial
Syntax-highlighted content of current @tutorial
file description
[package/[subpackage/]]tutoria
Documents magic property of class
@global declared via __get and __set magic
lname.ext[#section[.subsection
@global datatype $name ]]
functions. The property is read-write.
Brings global variable of function out to [,[package/[subpackage/]]tutor
documentation. Used in documentation
@property-read ialname.ext[#section[.subsecti
of function. @property-read [datatype] on]]]+ description
@global datatype description $name description Link to the documentation for a tutorial
Documents global variable in function Same as @property, but read-only.
@ignore @property-write
@ignore @property-write [datatype]
phpDocumentator will ignore such- $name description
marked element Same as @property, but write-only.
@uses Documents that documented element @var
uses another element and how. Creates
@uses @var datatype description
link from documentation of using
file.ext|elementname|class::me Class variable. Any PHP data-type is
element to used element as well as from
thodname()|class::$variablenam valid as well as 'mixed'
used element to using element.
e| function functionname @version
description @version string
Version of any element
Inline tags
{@example} {@internal}} {@source}
{@example path/to/example {@internal any text including {@source [startline number-of-
startline no-of-lines} inline tags }} lines]}
Displays example inline. Path can be Encloses text present only in extended Brings source of method or function to
absolute, relative or URL – any that documentation. Becasuse it may contain documentation.
fopen accepts. other tags it must be ended by }}. {@toc}
{@id} {@inheritdoc} {@toc}
{@id sectionname} {@inheritdoc} TOC for all {@id}s in a file
Used in tutorials / extended Inherits documentation from parent class {@tutorial}
documentation to control XML tutorial – for @author, @varsion, {@tutorial
ids and refsects. @copyright. [package/[subpackage/]]tutoria
{@link} lname.ext[#section[.subsection
{@link URL description} ]] description
{@link element description} Links documentation for tutorial
Links to URL or other element

See http://phpdoc.org/

You might also like