1 <?php
2 /**
3 * Neevo - Tiny database layer for PHP. (http://neevo.smasty.net)
4 *
5 * This source file is subject to the MIT license that is bundled
6 * with this package in the file license.txt.
7 *
8 * Copyright (c) 2012 Smasty (http://smasty.net)
9 *
10 */
11
12 namespace Neevo;
13
14
15 /**
16 * Neevo observable interface.
17 * @author Smasty
18 */
19 interface ObservableInterface {
20
21
22 /**
23 * Attaches given observer to given event.
24 * @param ObserverInterface $observer
25 * @param int $event
26 */
27 public function attachObserver(ObserverInterface $observer, $event);
28
29
30 /**
31 * Detaches given observer.
32 * @param ObserverInterface $observer
33 */
34 public function detachObserver(ObserverInterface $observer);
35
36
37 /**
38 * Notifies all observers attached to given event.
39 * @param int $event
40 */
41 public function notifyObservers($event);
42
43
44 }
45