PHP Класс Event, someline-starter

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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