@var
Document the data type of a class variable
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.
The datatype should be a valid PHP type (int, string, bool, etc), a class name for the type of object, or simply "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;
}