PHP 클래스 Webiny\Component\EventManager\EventListener

A new EventListener is created each time you subscribe to an event.
상속: use trait Webiny\Component\StdLib\StdLibTrait
파일 보기 프로젝트 열기: Webiny/Framework

공개 메소드들

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