phpDocumentor

Dispatcher extends EventDispatcher
in package

Event Dispatching class.

This class provides a bridge to the Symfony2 EventDispatcher. At current this is provided by inheritance but future iterations should solve this by making it an adapter pattern.

The class is implemented as (mockable) Singleton as this was the best solution to make the functionality available in every class of the project.

Tags
used-by
Transformer::initializeWriter()

to emit the events surrounding an initialization.

used-by
Transformer::applyTransformationToProject()

to emit the events surrounding a transformation.

Table of Contents

$instances  : array<string|int, Dispatcher>
getInstance()  : self
Returns a named instance of the Event Dispatcher.
setInstance()  : void
Sets a names instance of the Event Dispatcher.

Properties

$instances

protected static array<string|int, Dispatcher> $instances = []

Keep track of an array of instances.

Tags

Methods

getInstance()

Returns a named instance of the Event Dispatcher.

public static getInstance([string $name = 'default' ]) : self
Parameters
$name : string = 'default'
Tags
Return values
self

setInstance()

Sets a names instance of the Event Dispatcher.

public static setInstance(string $name, self $instance) : void
Parameters
$name : string
$instance : self
Tags
Return values
void

        

Search results