TYPO3
7.6
|
Public Member Functions | |
initializeObject () | |
connect ($signalClassName, $signalName, $slotClassNameOrObject, $slotMethodName= '', $passSignalInformation=true) | |
dispatch ($signalClassName, $signalName, array $signalArguments=array()) | |
getSlots ($signalClassName, $signalName) | |
Protected Attributes | |
$isInitialized = false | |
$objectManager | |
$slots = array() | |
A dispatcher which dispatches signals by calling its registered slot methods and passing them the method arguments which were originally passed to the signal method.
Definition at line 24 of file extbase/Classes/SignalSlot/Dispatcher.php.
connect | ( | $signalClassName, | |
$signalName, | |||
$slotClassNameOrObject, | |||
$slotMethodName = '' , |
|||
$passSignalInformation = true |
|||
) |
Connects a signal with a slot. One slot can be connected with multiple signals by calling this method multiple times.
string | $signalClassName | Name of the class containing the signal |
string | $signalName | Name of the signal |
mixed | $slotClassNameOrObject | Name of the class containing the slot or the instantiated class or a Closure object |
string | $slotMethodName | Name of the method to be used as a slot. If $slotClassNameOrObject is a Closure object, this parameter is ignored |
bool | $passSignalInformation | If set to TRUE, the last argument passed to the slot will be information about the signal (EmitterClassName::signalName) |
\InvalidArgumentException |
Definition at line 76 of file extbase/Classes/SignalSlot/Dispatcher.php.
dispatch | ( | $signalClassName, | |
$signalName, | |||
array | $signalArguments = array() |
||
) |
Dispatches a signal by calling the registered Slot methods
string | $signalClassName | Name of the class containing the signal |
string | $signalName | Name of the signal |
array | $signalArguments | arguments passed to the signal method |
Exception\InvalidSlotException | if the slot is not valid |
Exception\InvalidSlotReturnException | if a slot returns invalid arguments (too few or return value is not an array) |
Definition at line 112 of file extbase/Classes/SignalSlot/Dispatcher.php.
References elseif, and Dispatcher\initializeObject().
getSlots | ( | $signalClassName, | |
$signalName | |||
) |
Returns all slots which are connected with the given signal
string | $signalClassName | Name of the class containing the signal |
string | $signalName | Name of the signal |
Definition at line 166 of file extbase/Classes/SignalSlot/Dispatcher.php.
initializeObject | ( | ) |
Initializes this object.
This methods needs to be used as alternative to inject aspects. Since this dispatches is used very early when the ObjectManager is not fully initialized (especially concerning caching framework), this is the only way.
Definition at line 55 of file extbase/Classes/SignalSlot/Dispatcher.php.
Referenced by Dispatcher\dispatch().
|
protected |
Definition at line 29 of file extbase/Classes/SignalSlot/Dispatcher.php.
|
protected |
Definition at line 34 of file extbase/Classes/SignalSlot/Dispatcher.php.
|
protected |
Definition at line 43 of file extbase/Classes/SignalSlot/Dispatcher.php.