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)

No description

$this
setCallback( callable|array $callback)

No description

void
handleEvent( EventInterface $event)

No description

Details

at line 51
__construct( callable|null $callback = null)

Parameters

callable|null $callback

at line 63
$this setCallback( callable|array $callback)

Parameters

callable|array $callback

Return Value

$this

Exceptions

Exception

at line 88
void handleEvent( EventInterface $event)

Parameters

EventInterface $event

Return Value

void

Exceptions

Exception