phpDocumentor phpDocumentor
[ class tree: phpDocumentor ] [ index: phpDocumentor ] [ all elements ]
Prev Next
@var

@var

Document the data type of a class variable

by Gregory Beaver
Tag Documentation written by cellog@php.net
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:

  1. class class1
  2. {
  3.    /**
  4.     * example of documenting a variable's type
  5.     * @var string 
  6.     */
  7.    var $variable;
  8.    /**
  9.     * example of documenting a variable's type
  10.     * @var string contains class1 information
  11.     */
  12.    var $variable_with_desc;
  13.    /**
  14.     * this variable is documented as type "mixed" since no @var tag is present
  15.     */
  16.    var $mixed_variable;
  17. }

Prev Up Next
@uses phpDocumentor tags @version

Documentation generated on Tue, 24 Oct 2006 09:20:15 -0500 by phpDocumentor 1.3.1