Method | Description | |
---|---|---|
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 |
Method | Description | |
---|---|---|
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 |
return | self |
public getHandlerInstance ( string $name ) : Imbo\EventListener\ListenerInterface | ||
$name | string | The name of the handler |
return | Imbo\EventListener\ListenerInterface |
public hasListenersForEvent ( string $eventName ) : boolean | ||
$eventName | string | The name of the event to check |
return | boolean |
public setEventTemplate ( Imbo\EventManager\EventInterface $event ) : self | ||
$event | Imbo\EventManager\EventInterface | A configured event instance |
return | self |