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/**
28 * Interface of drivers that provide the advanced Key Value Persistence
29 * Some Key value provide hash possibilities
30 *
31 * @author Patrick Plichart <patrick@taotesting.com>
32 */
33interface common_persistence_AdvKvDriver extends common_persistence_KvDriver
34{
35    public function hmSet($key, $fields);
36    public function hExists($key, $field);
37    public function hSet($key, $field, $value);
38    public function hGet($key, $field);
39    public function hDel($key, $field): bool;
40    public function hGetAll($key);
41    public function keys($pattern);
42
43    /**
44     * Increment value and return the new value, can return negative numbers
45     *
46     * @param string $key
47     * @return integer
48     * @throws common_exception_InconsistentData on non int value
49     */
50    public function incr($key);
51
52    /**
53     * Decrement value and return the new value, can return negative numbers
54     *
55     * @param $key
56     * @return integer
57     * @throws common_exception_InconsistentData on non int value
58     */
59    public function decr($key);
60}