Observers
From RedBean
Observers
RedBean supports observers to make it easy to add additional functionality without having to alter any class. 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). The DBAdapter supports the event called "sql_exec". 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!

