Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | /** |
4 | * This program is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU General Public License |
6 | * as published by the Free Software Foundation; under version 2 |
7 | * of the License (non-upgradable). |
8 | * |
9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | * |
18 | * Copyright (c) 2013 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT); |
19 | * |
20 | * @author Patrick Plichart <patrick@taotesting.com> |
21 | * @license GPLv2 |
22 | * @package generis |
23 | * |
24 | */ |
25 | |
26 | /** |
27 | * Interface of drivers that provide hash possibilities |
28 | * |
29 | * @author Patrick Plichart <patrick@taotesting.com> |
30 | * @author Joel Bout <joel@taotesting.com> |
31 | */ |
32 | interface common_persistence_HashTableDriver extends common_persistence_Driver |
33 | { |
34 | /** |
35 | * Sets multiple fields in a single operation |
36 | * |
37 | * @param string $key |
38 | * @param array $fields |
39 | * @return boolean |
40 | */ |
41 | public function hmSet($key, $fields); |
42 | |
43 | /** |
44 | * Checks whenever a given field exists for a given key |
45 | * |
46 | * @param string $key |
47 | * @param string $field |
48 | * @return boolean |
49 | */ |
50 | public function hExists($key, $field); |
51 | |
52 | /** |
53 | * Sets the value of a field |
54 | * |
55 | * @param string $key |
56 | * @param string $field |
57 | * @param string $value |
58 | * @return boolean |
59 | */ |
60 | public function hSet($key, $field, $value); |
61 | |
62 | /** |
63 | * gets the value of a field |
64 | * return false if not found |
65 | * |
66 | * @param string $key |
67 | * @param string $field |
68 | * @return string |
69 | */ |
70 | public function hGet($key, $field); |
71 | |
72 | /** |
73 | * Delete the value for provided field. |
74 | * |
75 | * @param string $key |
76 | * @param string $field |
77 | * @return string |
78 | */ |
79 | public function hDel($key, $field); |
80 | |
81 | /** |
82 | * Get all fields of the Hashtable |
83 | * return false if not found |
84 | * |
85 | * @param string $key |
86 | * @return array |
87 | */ |
88 | public function hGetAll($key); |
89 | } |