8 * Interface for Observer object. Implementation of the
11 * @file RedBeanPHP/Observer.php
12 * @author Gabor de Mooij and the RedBeanPHP community
14 * @desc Part of the observer pattern in RedBean
17 * copyright (c) G.J.G.T. (Gabor) de Mooij and the RedBeanPHP Community.
18 * This source file is subject to the BSD/GPLv2 License that is bundled
19 * with this source code in the file license.txt.
24 * An observer object needs to be capable of receiving
25 * notifications. Therefore the observer needs to implement the
26 * onEvent method with two parameters: the event identifier specifying the
27 * current event and a message object (in RedBeanPHP this can also be a bean).
29 * @param string $eventname event identifier
30 * @param mixed $bean a message sent along with the notification
34 public function onEvent( $eventname, $bean );