1 | <?php |
||
15 | class PHPRedis implements Driver |
||
16 | { |
||
17 | /** |
||
18 | * @var Redis |
||
19 | */ |
||
20 | private $redis; |
||
21 | |||
22 | 31 | public function __construct(Redis $redis = null) |
|
30 | |||
31 | 1 | public function connect($host, $port, $timeout) |
|
35 | |||
36 | 1 | public function set($key, $value, $options = array()) |
|
40 | |||
41 | /** |
||
42 | * phpunit can't mock function whose name is keyword,so this |
||
43 | * function have no unit test.You should modify carefully. |
||
44 | * @param $script |
||
45 | * @param array $args |
||
46 | * @param int $numKeys |
||
47 | * @return mixed |
||
48 | */ |
||
49 | public function evalScript($script, $args = array(), $numKeys = 0) |
||
53 | |||
54 | /** |
||
55 | * This method will never throw exception, only return false when can't connect with server |
||
56 | * this function will return false or +PONG |
||
57 | * @return mixed |
||
58 | */ |
||
59 | 2 | public function ping() |
|
68 | |||
69 | 1 | public function setOption($key, $value) |
|
73 | |||
74 | 25 | public function getPrefixOptionName() |
|
78 | |||
79 | 1 | public function getInstance() |
|
83 | } |
||
84 |