| Previous | Up | Next |
| inline {@internal}} | phpDocumentor Inline tags | inline {@link} |
The {@inheritdoc} inline tag is used in the DocBlocks of classes, methods and class variables of child classes. phpDocumentor will automatically inherit the @author tag, @version tag, and @copyright tag from a parent class. In addition, if there is no documentation comment present, it will inherit the parent's documentation.
Note that if the {@inheritdoc} inline tag is not present, and a child class is undocumented, the child class will still attempt to inherit documentation from the parent class as is. {@inheritdoc} allows flexibility of where to put documentation from the parent class in a child class's documentation.
In some cases, the child class may want to simply augment the parent class's documentation. This is the primary purpose {@inheritdoc} was designed for. For example:
This source code will parse as if it was:
| Previous | Up | Next |
| inline {@internal}} | phpDocumentor Inline tags | inline {@link} |
Documentation generated on Sun, 30 Mar 2008 22:45:15 -0500 by phpDocumentor 1.4.2