class EventObserverProxy implements ObserverInterface
Class EventObserverProxy
This proxy class will try to always construct an object
compliant with the ObserverInterface
. It uses a simple
callback
property that can be:
- a "real"
ObserverInterface
object - another object with a
handleEvent( EventInterface $event )
method - an array like
array( class , method )
to call a specific method - a closure to call when the event is fired
Methods
__construct(callable|null $callback = null)
|
||
$this |
setCallback(callable|array $callback)
|
|
mixed|null |
handleEvent(EventInterface $event)
|
Details
at line 51
public
__construct(callable|null $callback = null)
at line 63
public $this
setCallback(callable|array $callback)
at line 88
public mixed|null
handleEvent(EventInterface $event)