@var
@var
Document the data type of a class variable
by Gregory Beaver
Copyright 2002, Gregory Beaver
(phpDocumentor 0.4.1+)
@var
datatype
description
Description
You may use the @var tag to document the data type of class variables.
datatype should be a valid PHP type or "mixed." phpDocumentor will display the optional description unmodified, and defaults to "mixed" if the datatype is not present
Example
Here's an example:
class class1
{
/**
* example of documenting a variable's type
* @var string
*/
var $variable;
/**
* example of documenting a variable's type
* @var string contains class1 information
*/
var $variable_with_desc;
/**
* this variable is documented as type "mixed" since no @var tag is present
*/
var $mixed_variable;
}