Call us: 0031 23-75-10500  |  Language: Dutch English German
 
The PxEventCallbackObserver Class

PxEventCallbackObserver: Simple observer for a callback

The PxEventCallbackObserver is a observer where the developer can register a single callback. When the a event
is fired the PxEventCallbackObserver will launch the callback and run it. The callback will receive the fired
event as the first parameter and the return value will be reported back to the Observer.

 // attach the observer to a subject $subject->attachObserver(new PxEventCallbackObserver(
function($event) { echo 'Notify me!'; return true; } ));

Synopsis


Class PxEventCallbackObserver implements PxEventObserver

Methods

public PxEventCallbackObserver::__construct ( callback $callback )