PHP 클래스 Neos\Flow\SignalSlot\Dispatcher

파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$slots array Indexed by [$signalClassName][$signalMethodName] and then numeric with an array of information about the slot

공개 메소드들

메소드 설명
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

메소드 상세

connect() 공개 메소드

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)
리턴 void

dispatch() 공개 메소드

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
리턴 void

getSignals() 공개 메소드

Returns all signals with its slots
public getSignals ( ) : array
리턴 array An array of arrays with slot information

getSlots() 공개 메소드

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
리턴 array An array of arrays with slot information

injectObjectManager() 공개 메소드

Injects the object manager
public injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
리턴 void

프로퍼티 상세

$objectManager 보호되어 있는 프로퍼티

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
리턴 Neos\Flow\ObjectManagement\ObjectManagerInterface

$slots 보호되어 있는 프로퍼티

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