1 | <?php |
||
5 | class Client extends \Predis\Client implements ClientInterface |
||
6 | { |
||
7 | /** |
||
8 | * {@inheritdoc} |
||
9 | */ |
||
10 | 1 | public function pop(string $key): ?string |
|
11 | { |
||
12 | 1 | return $this->call('lpop', [$key]); |
|
13 | } |
||
14 | |||
15 | /** |
||
16 | * {@inheritdoc} |
||
17 | */ |
||
18 | 2 | public function push(string $key, ...$values): int |
|
22 | |||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | */ |
||
26 | 2 | public function count(string $key): int |
|
30 | |||
31 | /** |
||
32 | * {@inheritdoc} |
||
33 | */ |
||
34 | 2 | public function remove(string $key): int |
|
38 | |||
39 | /** |
||
40 | * Creates a Redis command with the specified arguments and sends a request to the server. |
||
41 | * |
||
42 | * @param string $command the command ID |
||
43 | * @param array $arguments the arguments for the command |
||
44 | * |
||
45 | * @return mixed |
||
46 | */ |
||
47 | 2 | protected function call($command, array $arguments = []) |
|
51 | } |
||
52 |