Previous Up Next
phpDocumentor tags phpDocumentor tags @access

@abstract

Document an abstract class or method

Gregory Beaver
Tag Documentation written by [email protected]
Chuck Burgess
Copyright 2002, Gregory Beaver
(phpDocumentor 1.1+)
@abstract

Description

Use the @abstract tag to declare a class as abstract, as well as for declaring what methods must be redefined in a child class.

The @abstract tag is only valid in PHP 4, PHP 5 has a keyword abstract.

Example

Here's an example:

  1. /**
  2.  * example of @abstract usage in a class
  3.  *
  4.  * if even one method is declared abstract,
  5.  * then the class itself should be also
  6.  * @abstract
  7.  */
  8. class myAbstractClass
  9. {
  10.    /**
  11.     * this method is abstract...
  12.     * it has no body...
  13.     * @abstract
  14.     */
  15.    function function1($baz
  16.    {
  17.        // no body
  18.    }
  19.  
  20.    /**
  21.     * this method is not abstract
  22.     */   
  23.    function function2()
  24.    {
  25.        // does something
  26.        ...
  27.    }
  28. }

Previous Up Next
phpDocumentor tags phpDocumentor tags @access

Documentation generated on Mon, 05 Dec 2011 21:01:48 -0600 by phpDocumentor 1.4.4