PHP 클래스 Event, someline-starter

파일 보기 프로젝트 열기: someline/someline-starter 1 사용 예제들

공개 메소드들

메소드 설명
createClassListener ( mixed $listener ) : Closure Create a class based listener using the IoC container.
fire ( string | object $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 pushed listeners.
getListeners ( string $eventName ) : array Get all of the listeners for a given event name.
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.
makeListener ( mixed $listener ) : mixed Register an event listener with the dispatcher.
push ( string $event, array $payload = [] ) : void Register an event and payload to be fired later.
setQueueResolver ( callable $resolver ) Set the queue resolver implementation.
subscribe ( object | string $subscriber ) : void Register an event subscriber with the dispatcher.
until ( string | object $event, array $payload = [] ) : mixed Fire an event until the first non-null response is returned.

메소드 상세

createClassListener() 공개 정적인 메소드

Create a class based listener using the IoC container.
public static createClassListener ( mixed $listener ) : Closure
$listener mixed
리턴 Closure

fire() 공개 정적인 메소드

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

firing() 공개 정적인 메소드

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

flush() 공개 정적인 메소드

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

forget() 공개 정적인 메소드

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

forgetPushed() 공개 정적인 메소드

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

getListeners() 공개 정적인 메소드

Get all of the listeners for a given event name.
public static getListeners ( string $eventName ) : array
$eventName string
리턴 array

hasListeners() 공개 정적인 메소드

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

listen() 공개 정적인 메소드

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

makeListener() 공개 정적인 메소드

Register an event listener with the dispatcher.
public static makeListener ( mixed $listener ) : mixed
$listener mixed
리턴 mixed

push() 공개 정적인 메소드

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

setQueueResolver() 공개 정적인 메소드

Set the queue resolver implementation.
public static setQueueResolver ( callable $resolver )
$resolver callable

subscribe() 공개 정적인 메소드

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

until() 공개 정적인 메소드

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