PHP Interface Mongolid\Event\EventTriggerInterface

Show file Open project: leroy-merlin-br/mongolid

Public Methods

Method Description
fire ( string $event, mixed $payload, boolean $halt ) : mixed Triggers / Dispatches a new event to the event handlers or listeners that are being used.

Method Details

fire() public method

Triggers / Dispatches a new event to the event handlers or listeners that are being used.
public fire ( string $event, mixed $payload, boolean $halt ) : 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".
return mixed Event handler return. The importance of this return is determined by $halt