Behaviour that runs through all elements and inherit base information when necessary.

Each class or interface needs to be examined from bottom to top. Since classes can inherit properties, methods and constants from multiple parents (both classes and interfaces) it is necessary to track whether all parents have been processed before processing a class. If a parent class and interface both have the same method declared; inherit the class' method as that will probably contain more specific information.

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

 Methods

Dispatches a logging request to log a debug message.

debug(string $message) : void
Inherited

inherited_from \phpDocumentor_Transformer_Abstract::debug()
inherited_from \phpDocumentor_Transformer_Behaviour_Abstract::debug()

Parameters

$message

string

The message to log.

Dispatches an event to the Event Dispatcher.

dispatch(string $name, \string[] $arguments) : mixed | null
Inherited

This method tries to dispatch an event; if no Event Dispatcher has been set than this method will explicitly not fail and return null. By not failing we make the Event Dispatcher optional and is it easier for people to re-use this component in their own application.

inherited_from \phpDocumentor_Transformer_Abstract::dispatch()
inherited_from \phpDocumentor_Transformer_Behaviour_Abstract::dispatch()

Parameters

$name

string

Name of the event to dispatch.

$arguments

\string[]

Arguments for this event.

Exceptions

\phpDocumentor_Parser_Exception if there is a dispatcher but it is not of type sfEventDispatcher

Returns

mixednull

Returns the transformer that hosts this behaviour.

getTransformer() : \phpDocumentor_Transformer
Inherited

inherited_from \phpDocumentor_Transformer_Behaviour_Abstract::getTransformer()

Returns

Dispatches a logging request.

log(string $message, int $priority) : void
Inherited

inherited_from \phpDocumentor_Transformer_Abstract::log()
inherited_from \phpDocumentor_Transformer_Behaviour_Abstract::log()

Parameters

$message

string

The message to log.

$priority

int

The logging priority, the lower, the more important. Ranges from 1 to 7

Apply inheritance of docblock elements to all elements.

process(DOMDocument $xml) : \DOMDocument

Apply the inheritance rules from root node to edge leaf; this way the inheritance cascades.

Parameters

$xml

\DOMDocument

XML structure to apply the behaviour on.

Returns

Sets the transformer used for this behaviour.

setTransformer(\phpDocumentor_Transformer $transformer) : void
Inherited

inherited_from \phpDocumentor_Transformer_Behaviour_Abstract::setTransformer()

Parameters

$transformer

\phpDocumentor_Transformer

Transformer responsible for output.

 Properties

 

The event dispatcher object, may be null to not dispatch events.

$event_dispatcher : \sfEventDispatcher | null
Inherited

inherited_from \phpDocumentor_Transformer_Abstract::$$event_dispatcher
inherited_from \phpDocumentor_Transformer_Behaviour_Abstract::$$event_dispatcher
 

$transformer

$transformer : \phpDocumentor_Transformer
Inherited

inherited_from \phpDocumentor_Transformer_Behaviour_Abstract::$$transformer