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) 2011 Martin Srank (http://smasty.net)
9 *
10 */
11
12
13 /**
14 * Neevo observer interface.
15 * @author Martin Srank
16 * @package Neevo
17 */
18 interface INeevoObserver {
19
20 // Event types
21 const CONNECT = 2,
22
23 SELECT = 4,
24 INSERT = 8,
25 UPDATE = 16,
26 DELETE = 32,
27 QUERY = 60, // SELECT, INSERT, UPDATE, DELETE
28
29 BEGIN = 64,
30 COMMIT = 128,
31 ROLLBACK = 256,
32 TRANSACTION = 448, // BEGIN, COMMIT, ROLLBACK
33
34 EXCEPTION = 512,
35 DISCONNECT =1024,
36 ALL = 2046;
37
38
39 /**
40 * Receive update from observable.
41 * @param INeevoObservable $observable
42 * @param int $event Event type
43 * @return void
44 */
45 public function updateStatus(INeevoObservable $observable, $event);
46
47
48 }
49