PHP Класс MongolidLaravel\LaravelEventTrigger

Наследование: implements Mongolid\Event\EventTriggerInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$dispatcher Illuminate\Contracts\Events\Dispatcher Laravel's Event dispatcher.

Открытые методы

Метод Описание
__construct ( Illuminate\Contracts\Events\Dispatcher $dispatcher ) Injects a Laravel's event dispatcher instance.
fire ( string $event, mixed $payload, boolean $halt ) : mixed Triggers / Dispatches a new event to the event handlers or listeners that are being used.

Описание методов

__construct() публичный метод

Injects a Laravel's event dispatcher instance.
public __construct ( Illuminate\Contracts\Events\Dispatcher $dispatcher )
$dispatcher Illuminate\Contracts\Events\Dispatcher Event dispatcher.

fire() публичный метод

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".
Результат mixed Event handler return. The importance of this return is determined by $halt

Описание свойств

$dispatcher защищенное свойство

Laravel's Event dispatcher.
protected Dispatcher,Illuminate\Contracts\Events $dispatcher
Результат Illuminate\Contracts\Events\Dispatcher