storage test
[m6w6/pq-gateway] / lib / pq / Mapper / StorageInterface.php
1 <?php
2
3 namespace pq\Mapper;
4
5 interface StorageInterface
6 {
7 /**
8 * Find by PK
9 * @param mixed $pk
10 * @return object
11 */
12 function get($pk);
13
14 /**
15 * Find
16 * @param array $where
17 * @param string $order
18 * @param int $limit
19 * @param int $offset
20 * @return object[]
21 */
22 function find($where = [], $order = null, $limit = null, $offset = null);
23
24 /**
25 * Delete
26 * @param object $object
27 */
28 function delete($object);
29
30 /**
31 * Save
32 * @param object $object
33 */
34 function save($object);
35
36 /**
37 * Buffer in a transaction
38 */
39 function buffer();
40
41 /**
42 * Commit
43 */
44 function flush();
45
46 /**
47 * Rollback
48 */
49 function discard();
50 }