PHP Класс Webiny\Component\EventManager\EventListener

A new EventListener is created each time you subscribe to an event.
Наследование: use trait Webiny\Component\StdLib\StdLibTrait
Показать файл Открыть проект

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

Метод Описание
getHandler ( ) : mixed Get handler object
getMethod ( ) : string Get handler method
getPriority ( ) : integer Get listener priority
handler ( $handler ) Set handler for event. Can be a callable, class name or class instance.
method ( string $method ) Set method to be called on handler.
If not set, default method will be called: handle(Event $event)
priority ( $priority ) Set listener priority between 101 and 999.
Default priority is 101.
Bigger values mean higher listener priority, and will be executed first.

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

getHandler() публичный Метод

Get handler object
public getHandler ( ) : mixed
Результат mixed

getMethod() публичный Метод

Get handler method
public getMethod ( ) : string
Результат string

getPriority() публичный Метод

Get listener priority
public getPriority ( ) : integer
Результат integer

handler() публичный Метод

Set handler for event. Can be a callable, class name or class instance.
public handler ( $handler )
$handler

method() публичный Метод

Set method to be called on handler.
If not set, default method will be called: handle(Event $event)
public method ( string $method )
$method string Method to call on handler

priority() публичный Метод

Set listener priority between 101 and 999.
Default priority is 101.
Bigger values mean higher listener priority, and will be executed first.
public priority ( $priority )
$priority