eZPublishCommunityProject  2013.4
eZ\Publish\Core\SignalSlot\SignalDispatcher Class Reference

Dispatches Signals to their assigned Slots. More...

+ Inheritance diagram for eZ\Publish\Core\SignalSlot\SignalDispatcher:

Public Member Functions

 attach ($signalIdentifier, $slotIdentifier)
 Attaches the Slot with $slotIdentifier to the signal with $signalIdentifier. More...
 
 emit (Signal $signal)
 Emits the given $signal. More...
 

Detailed Description

Dispatches Signals to their assigned Slots.

An instance of this class is required by each object that needs to send Signals. It is recommended, that a SignalDispatcher works together with a SlotFactory to get hold of the actual Slots that listen for a given Signal, which it originally only knows by their identifier.

Member Function Documentation

eZ\Publish\Core\SignalSlot\SignalDispatcher::attach (   $signalIdentifier,
  $slotIdentifier 
)
abstract

Attaches the Slot with $slotIdentifier to the signal with $signalIdentifier.

Parameters
string$signalIdentifier
string$slotIdentifier
Returns
void
Todo:
Are we sure we want to expose this method? Might lead to dynamic attachments at runtime, which can lead to hard debugging. Better only accept attachments during construction (config).
eZ\Publish\Core\SignalSlot\SignalDispatcher::emit ( Signal  $signal)
abstract

Emits the given $signal.

All assigned slots will eventually receive the $signal

Parameters
Signal$signal
Returns
void

The documentation for this class was generated from the following file: