Wrapper class around a DOMElement containing a DocBlock definition.

This class provides accessors for a DOMElement that contains a DocBlock definition and methods to filter and inherit DocBlocks.

category phpDocumentor
package Transformer
subpackage Behaviour
author Mike van Riel
license MIT
link http://phpdoc.org

 Methods

Passes all unknown method directly into the node.

__call(string $name, \mixed[] $arguments) : mixed
Inherited

inherited_from \phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_Abstract::__call()

Parameters

$name

string

Method name.

$arguments

\mixed[]

Array containing the method arguments.

Returns

mixed

Load the node belonging to this object and make an associative array of classes and interfaces available.

__construct(DOMElement $node, array $nodes) 
Inherited

inherited_from \phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_Abstract::__construct()

Parameters

$node

\DOMElement

Node that needs to be decorated by this class.

$nodes

\phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_Class[]

&$nodes Associative array containing all class/interface type nodes.

Removes all tags with a given name from this DocBlock.

filterTags(string $name) : void

Parameters

$name

string

Name of the tag type to remove.

Returns the docblock element for the given node; if none exists it will be added.

getDocBlock() : \phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_DocBlock
Inherited

inherited_from \phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_Abstract::getDocBlock()

Returns

Returns the Node of the long description for this DocBlock.

getLongDescription() : \DOMElement | false

To get the value append`->nodeValue` to the result of this method.

Returns

Returns the contained node.

getNode() : \DOMElement
Inherited

inherited_from \phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_Abstract::getNode()

Returns

Returns the Node of the short description for this DocBlock.

getShortDescription() : \DOMElement | false

To get the value append`->nodeValue` to the result of this method.

Returns

Returns all DOMElements representing tags.

getTags() : \DOMElement[]

Returns

Returns all DOMElements representing tags with the given name.

getTagsByName(string $name) : \DOMElement[]

Parameters

$name

string

Name of the tag type to find.

Returns

Inherits the short description, long description and tags of the given $parent node.

inherit(\phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_DocBlock $parent) : void

Parameters

Sets the nodes.

setNodes(\phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_Class[] $nodes) 
Inherited

inherited_from \phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_Abstract::setNodes()

Parameters

$nodes

\phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_Class[]

&$nodes Associative array containing all class/interface type nodes.

Removes the `subpackage` index from the given list of tags if the `package` of this class does not match its parent.

filterSubpackageInheritance(phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_DocBlock $parent, array $tags) : void

Parameters

$tags

\string[]

&$tags Array of inheritable tags to filter.

Returns the elements with the given tag name that can be found as direct children of $node.

getDirectElementsByTagName(\DOMElement | \InheritClass $node, string $element_name) : \DOMElement[]
Inherited

getElementsByTagName returns all DOMElements with the given tag name regardless where in the DOM subtree they are. This method checks whether the parent node matches the given node and thus determines whether it is a direct child.

inherited_from \phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_Abstract::getDirectElementsByTagName()

Parameters

$node

\DOMElement\InheritClass

Node to search in.

$element_name

string

Name of the element to find.

Returns

Inherits the long description from the given parent DocBlock.

inheritLongDescription(phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_DocBlock $parent) : void

Parameters

$parent

\phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_DocBlock

parent docblock whose long description to inherit.

Inherits the short description from the given parent DocBlock.

inheritShortDescription(phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_DocBlock $parent) : void

Parameters

$parent

\phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_DocBlock

Node to inherit the short description from.

Copies tag nodes from the given $parent to this DocBlock if the name occurs in the given $tags array.

inheritTags(phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_DocBlock $parent, array $tags) : void

Parameters

$tags

\string[]

List of inheritable tags.

Determines whether the long description should be inherited from the given parent description.

shouldInheritLongDescription(\DOMElement | false $super_desc) : bool

Parameters

$super_desc

\DOMElementfalse

The long description found in the parent DocBlock.

Returns

bool

Determines whether the short description should be inherited from the given parent description.

shouldInheritShortDescription(\DOMElement | false $super_desc) : bool

Parameters

$super_desc

\DOMElementfalse

The short description found in the parent DocBlock.

Returns

bool

 Properties

 

$inherited_tags

$inherited_tags 

 

$node

$node : \DOMElement
Inherited

inherited_from \phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_Abstract::$$node
 

$nodes

$nodes : \phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_Class[]
Inherited

inherited_from \phpDocumentor_Plugin_Core_Transformer_Behaviour_Inherit_Node_Abstract::$$nodes