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

inline {@inheritdoc}

Used to directly inherit the long description from the parent class in child classes

by Gregory Beaver
Tag Documentation written by cellog@php.net
Copyright 2002, Gregory Beaver
(phpDocumentor 1.2+)
{@inheritdoc}

Description

The {@inheritdoc} inline tag is used in the class DocBlocks of child classes. phpDocumentor will automatically inherit the @author tag, @version tag, and @copyright tag from a parent class.

{@inheritdoc} allows flexibility of where to put documentation from the parent class in a child class's documentation.

Example

  1. /**
  2.  * Makes bars
  3.  *
  4.  * This class generates bars using the main algorithm.
  5.  */
  6. class bar
  7. {
  8. }
  9.  
  10. /**
  11.  * Makes chocolate bars
  12.  *
  13.  * There are two aspects to this class.
  14.  * {@inheritdoc }  In addition, the foo class
  15.  * makes the bars chocolate
  16.  */
  17. class foo extends bar
  18. {
  19. }

This source code will parse as if it was:

  1. /**
  2.  * Makes bars
  3.  *
  4.  * Generates bars using the main algorithm.
  5.  */
  6. class bar
  7. {
  8. }
  9.  
  10. /**
  11.  * Makes chocolate bars
  12.  *
  13.  * There are two aspects to this class.
  14.  * This class generates bars using the main algorithm.  In addition, the foo class
  15.  * makes the bars chocolate
  16.  */
  17. class foo extends bar
  18. {
  19. }

Prev Up Next
inline {@internal}} phpDocumentor Inline tags inline {@link}

Documentation generated on Mon, 11 Mar 2019 15:50:07 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.