PHP Class Neos\Flow\SignalSlot\Dispatcher

Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$slots array Indexed by [$signalClassName][$signalMethodName] and then numeric with an array of information about the slot

Méthodes publiques

Méthode Description
connect ( string $signalClassName, string $signalName, mixed $slotClassNameOrObject, string $slotMethodName = '', boolean $passSignalInformation = true ) : void Connects a signal with a slot.
dispatch ( string $signalClassName, string $signalName, array $signalArguments = [] ) : void Dispatches a signal by calling the registered Slot methods
getSignals ( ) : array Returns all signals with its slots
getSlots ( string $signalClassName, string $signalName ) : array Returns all slots which are connected with the given signal
injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void Injects the object manager

Method Details

connect() public méthode

One slot can be connected with multiple signals by calling this method multiple times.
public connect ( string $signalClassName, string $signalName, mixed $slotClassNameOrObject, string $slotMethodName = '', boolean $passSignalInformation = true ) : void
$signalClassName string Name of the class containing the signal
$signalName string Name of the signal
$slotClassNameOrObject mixed Name of the class containing the slot or the instantiated class or a Closure object
$slotMethodName string Name of the method to be used as a slot. If $slotClassNameOrObject is a Closure object, this parameter is ignored
$passSignalInformation boolean If set to TRUE, the last argument passed to the slot will be information about the signal (EmitterClassName::signalName)
Résultat void

dispatch() public méthode

Dispatches a signal by calling the registered Slot methods
public dispatch ( string $signalClassName, string $signalName, array $signalArguments = [] ) : void
$signalClassName string Name of the class containing the signal
$signalName string Name of the signal
$signalArguments array arguments passed to the signal method
Résultat void

getSignals() public méthode

Returns all signals with its slots
public getSignals ( ) : array
Résultat array An array of arrays with slot information

getSlots() public méthode

Returns all slots which are connected with the given signal
public getSlots ( string $signalClassName, string $signalName ) : array
$signalClassName string Name of the class containing the signal
$signalName string Name of the signal
Résultat array An array of arrays with slot information

injectObjectManager() public méthode

Injects the object manager
public injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
Résultat void

Property Details

$objectManager protected_oe property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
Résultat Neos\Flow\ObjectManagement\ObjectManagerInterface

$slots protected_oe property

Indexed by [$signalClassName][$signalMethodName] and then numeric with an array of information about the slot
protected array $slots
Résultat array