Collection object for a set of Behaviours.

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

 Methods

Initializes the list of Behaviours to execute each request.

__construct(\phpDocumentor\Transformer\Transformer $transformer, array $behaviours) 

Parameters

$transformer

\phpDocumentor\Transformer\Transformer

Object that executes the transformation and contains the meta-data.

$behaviours

\phpDocumentor\Transformer\Behaviour\BehaviourAbstract[]

List of behaviours to process.

Adds a behaviour to a collection

addBehaviour(\phpDocumentor\Transformer\Behaviour\BehaviourAbstract $behaviour) : void

Parameters

$behaviour

\phpDocumentor\Transformer\Behaviour\BehaviourAbstract

Behaviour to add to the collection.

Dispatches a logging request to log a debug message.

debug(string $message) : void
Inherited
inherited_from \phpDocumentor\Transformer\TransformerAbstract::debug()
inherited_from \phpDocumentor\Transformer\Behaviour\BehaviourAbstract::debug()

Parameters

$message

string

The message to log.

Returns the transformer that hosts this behaviour.

getTransformer() : \phpDocumentor\Transformer\Transformer
Inherited
inherited_from \phpDocumentor\Transformer\Behaviour\BehaviourAbstract::getTransformer()

Returns

Dispatches a logging request.

log(string $message, int $priority) : void
Inherited
inherited_from \phpDocumentor\Transformer\TransformerAbstract::log()
inherited_from \phpDocumentor\Transformer\Behaviour\BehaviourAbstract::log()

Parameters

$message

string

The message to log.

$priority

int

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

Executes the behaviour on the given structure xml source,

process(\DOMDocument $xml) : \DOMDocument

Parameters

$xml

\DOMDocument

Structure source to apply the behaviours on.

Returns

Removes a behaviour from the collection

removeBehaviour(\phpDocumentor\Transformer\Behaviour\BehaviourAbstract $behaviour) : void

Parameters

$behaviour

\phpDocumentor\Transformer\Behaviour\BehaviourAbstract

Behaviour to remove from the collection.

Sets the transformer used for this behaviour.

setTransformer(\phpDocumentor\Transformer\Transformer $transformer) : void
Inherited
inherited_from \phpDocumentor\Transformer\Behaviour\BehaviourAbstract::setTransformer()

Parameters

$transformer

\phpDocumentor\Transformer\Transformer

Transformer responsible for output.

 Properties

   

$transformer

$transformer : \phpDocumentor\Transformer\Transformer