PHP 클래스 Mongolid\Event\EventTriggerService

파일 보기 프로젝트 열기: leroy-merlin-br/mongolid 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$dispatcher Mongolid\Event\EventTriggerInterface The one who are going to actually trigger the events to the rest of the application.

공개 메소드들

메소드 설명
fire ( string $event, mixed $payload, boolean $halt = false ) : mixed Triggers / Dispatches a new event to the registered event handlers if they have been registered.
registerEventDispatcher ( Mongolid\Event\EventTriggerInterface $dispatcher ) : void Registers a object that will have the responsibility of firing events to the rest of the application.

메소드 상세

fire() 공개 메소드

Triggers / Dispatches a new event to the registered event handlers if they have been registered.
public fire ( string $event, mixed $payload, boolean $halt = false ) : mixed
$event string Identification of the event.
$payload mixed Data that is going to be sent to the event handler.
$halt boolean The output of the event handler will be used in a conditional inside the context of where the event is being fired. This means that, if the event handler returns false, it will probably stop the action being executed, for example, "saving".
리턴 mixed Event handler return. The importance of this return is determined by $halt

registerEventDispatcher() 공개 메소드

Registers a object that will have the responsibility of firing events to the rest of the application.
public registerEventDispatcher ( Mongolid\Event\EventTriggerInterface $dispatcher ) : void
$dispatcher Mongolid\Event\EventTriggerInterface Event trigger object.
리턴 void

프로퍼티 상세

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

The one who are going to actually trigger the events to the rest of the application.
protected EventTriggerInterface,Mongolid\Event $dispatcher
리턴 Mongolid\Event\EventTriggerInterface