Dispatcher
class Dispatcher (View source)
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.
Properties
protected ObjectManagerInterface | $objectManager | ||
protected array | $slots | Information about all slots connected a certain signal. |
Methods
void
void
connect(string $signalClassName, string $signalName, mixed $slotClassNameOrObject, string $slotMethodName = '', bool $passSignalInformation = true)
Connects a signal with a slot.
void
dispatch(string $signalClassName, string $signalName, array $signalArguments = [])
Dispatches a signal by calling the registered Slot methods
array
getSlots(string $signalClassName, string $signalName)
Returns all slots which are connected with the given signal
array
getSignals()
Returns all signals with its slots
Details
void
injectObjectManager(ObjectManagerInterface $objectManager)
Injects the object manager
void
connect(string $signalClassName, string $signalName, mixed $slotClassNameOrObject, string $slotMethodName = '', bool $passSignalInformation = true)
Connects a signal with a slot.
One slot can be connected with multiple signals by calling this method multiple times.
void
dispatch(string $signalClassName, string $signalName, array $signalArguments = [])
Dispatches a signal by calling the registered Slot methods
array
getSlots(string $signalClassName, string $signalName)
Returns all slots which are connected with the given signal
array
getSignals()
Returns all signals with its slots