CallbackListener
in package
implements
ListenerInterface
Table of Contents
Interfaces
Properties
- $callback : callable
- The callback.
Methods
- __construct() : mixed
- Create a new callback listener instance.
- fromCallable() : static
- Named constructor
- getCallback() : callable
- Get the callback.
- handle() : void
- Handle an event.
- isListener() : bool
- Check whether the listener is the given parameter.
Properties
$callback
The callback.
protected
callable
$callback
Methods
__construct()
Create a new callback listener instance.
public
__construct(callable $callback) : mixed
Parameters
- $callback : callable
fromCallable()
Named constructor
public
static fromCallable(callable $callable) : static
Parameters
- $callable : callable
Return values
staticgetCallback()
Get the callback.
public
getCallback() : callable
Return values
callablehandle()
Handle an event.
public
handle(EventInterface $event) : void
Parameters
- $event : EventInterface
Tags
isListener()
Check whether the listener is the given parameter.
public
isListener(mixed $listener) : bool
Parameters
- $listener : mixed