Yaffs site version 1.1
[yaffs-website] / vendor / gabordemooij / redbean / RedBeanPHP / Observer.php
1 <?php
2
3 namespace RedBeanPHP;
4
5 /**
6  * Observer.
7  *
8  * Interface for Observer object. Implementation of the
9  * observer pattern.
10  *
11  * @file    RedBeanPHP/Observer.php
12  * @author  Gabor de Mooij and the RedBeanPHP community
13  * @license BSD/GPLv2
14  * @desc    Part of the observer pattern in RedBean
15  *
16  * @copyright
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.
20  */
21 interface Observer
22 {
23         /**
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).
28          *
29          * @param string $eventname event identifier
30          * @param mixed  $bean      a message sent along with the notification
31          *
32          * @return void
33          */
34         public function onEvent( $eventname, $bean );
35 }