메소드 | 설명 | |
---|---|---|
addCallbacks ( string $name, array $events, array $users = [] ) : self | Add one or more callbacks | |
addEventHandler ( string $name, mixed $handler, array $params = [] ) : self | Register an event handler | |
addInitializer ( Imbo\EventListener\Initializer\InitializerInterface $initializer ) : self | Add an event listener initializer | |
getHandlerInstance ( string $name ) : Imbo\EventListener\ListenerInterface | Get a handler instance | |
hasListenersForEvent ( string $eventName ) : boolean | Whether or not the manager has event listeners that subscribes to a specific event | |
setEventTemplate ( Imbo\EventManager\EventInterface $event ) : self | Set the event template | |
trigger ( string $eventName, array $params = [] ) : |
Trigger a given event |
메소드 | 설명 | |
---|---|---|
getEventNameParts ( string $event ) | Get all parts of an event name | |
getListenersForEvent ( string $event ) : |
Get all listeners that listens for an event, including wildcard listeners | |
triggersFor ( string $user = null, array $filter = [] ) : boolean | Check if a listener will trigger for a given user |
public addInitializer ( Imbo\EventListener\Initializer\InitializerInterface $initializer ) : self | ||
$initializer | Imbo\EventListener\Initializer\InitializerInterface | An initializer instance |
리턴 | self |
public getHandlerInstance ( string $name ) : Imbo\EventListener\ListenerInterface | ||
$name | string | The name of the handler |
리턴 | Imbo\EventListener\ListenerInterface |
public hasListenersForEvent ( string $eventName ) : boolean | ||
$eventName | string | The name of the event to check |
리턴 | boolean |
public setEventTemplate ( Imbo\EventManager\EventInterface $event ) : self | ||
$event | Imbo\EventManager\EventInterface | A configured event instance |
리턴 | self |