onEvent()
onEvent(string $eventname, mixed $bean) : void
An observer object needs to be capable of receiving notifications. Therefore the observer needs to implement the onEvent method with two parameters: the event identifier specifying the current event and a message object (in RedBeanPHP this can also be a bean).
Parameters
string | $eventname | event identifier |
mixed | $bean | a message sent along with the notification |