PHP 클래스 TestDispatcher

상속: extends Dispatcher
파일 보기 프로젝트 열기: tzookb/tbmsg 1 사용 예제들

공개 메소드들

메소드 설명
fire ( string $event, mixed $payload = [], boolean $halt = false ) : array | null Fire an event and call the listeners.
firing ( ) : string Get the event that is currently firing.
flush ( string $event ) : void Flush a set of pushed events.
forget ( string $event ) : void Remove a set of listeners from the dispatcher.
forgetPushed ( ) : void Forget all of the queued listeners.
hasListeners ( string $eventName ) : boolean Determine if a given event has listeners.
listen ( string | array $events, mixed $listener, integer $priority ) : void Register an event listener with the dispatcher.
push ( string $event, array $payload = [] ) : void Register an event and payload to be fired later.
subscribe ( object | string $subscriber ) : void Register an event subscriber with the dispatcher.
until ( string $event, array $payload = [] ) : mixed Fire an event until the first non-null response is returned.

메소드 상세

fire() 공개 메소드

Fire an event and call the listeners.
public fire ( string $event, mixed $payload = [], boolean $halt = false ) : array | null
$event string
$payload mixed
$halt boolean
리턴 array | null

firing() 공개 메소드

Get the event that is currently firing.
public firing ( ) : string
리턴 string

flush() 공개 메소드

Flush a set of pushed events.
public flush ( string $event ) : void
$event string
리턴 void

forget() 공개 메소드

Remove a set of listeners from the dispatcher.
public forget ( string $event ) : void
$event string
리턴 void

forgetPushed() 공개 메소드

Forget all of the queued listeners.
public forgetPushed ( ) : void
리턴 void

hasListeners() 공개 메소드

Determine if a given event has listeners.
public hasListeners ( string $eventName ) : boolean
$eventName string
리턴 boolean

listen() 공개 메소드

Register an event listener with the dispatcher.
public listen ( string | array $events, mixed $listener, integer $priority ) : void
$events string | array
$listener mixed
$priority integer
리턴 void

push() 공개 메소드

Register an event and payload to be fired later.
public push ( string $event, array $payload = [] ) : void
$event string
$payload array
리턴 void

subscribe() 공개 메소드

Register an event subscriber with the dispatcher.
public subscribe ( object | string $subscriber ) : void
$subscriber object | string
리턴 void

until() 공개 메소드

Fire an event until the first non-null response is returned.
public until ( string $event, array $payload = [] ) : mixed
$event string
$payload array
리턴 mixed