Observers
From RedBean
Observers
RedBean supports observers to make it easy to add additional functionality without having to alter any class (also see Toolbox). To attach a listener to an object:
$redbean->addEventListener( $event, $myListener );
The following events are supported by the RedBean Core Class: "open" (load), "update" (store), "delete" (trash), "dispense" (after dispense), "after_update" and "after_delete". The DBAdapter (Querying) supports the event called "sql_exec". These events are very useful for Fuse. All observables will call the onEvent() method defined in the observer interface. Observers need to implement the Observer interface while Observables need to extend the Observable class. The Observable method
signal($event, $info)
is used to send events to registered observers. $info is of type mixed, so you can send info of any type to the observers!
Also see: Advanced

