1 | <?php |
||
23 | class Server |
||
24 | { |
||
25 | /** |
||
26 | * @var Config |
||
27 | */ |
||
28 | private $config; |
||
29 | |||
30 | /** |
||
31 | * @var Driver; |
||
32 | */ |
||
33 | private $instance; |
||
34 | |||
35 | /** |
||
36 | * @var Driver |
||
37 | */ |
||
38 | protected $driver; |
||
39 | |||
40 | /** |
||
41 | * Server constructor. |
||
42 | * @param Config $config |
||
43 | * @param Driver $driver |
||
44 | */ |
||
45 | 24 | public function __construct(Config $config, Driver $driver) |
|
50 | |||
51 | /** |
||
52 | * @return Config |
||
53 | */ |
||
54 | 2 | public function getConfig() |
|
58 | |||
59 | /** |
||
60 | * @return Driver |
||
61 | */ |
||
62 | 1 | public function getDriver() |
|
66 | |||
67 | /** |
||
68 | * @throws ServerConnectException |
||
69 | * @throws ServersOperateException |
||
70 | */ |
||
71 | 12 | protected function open() |
|
89 | |||
90 | /** |
||
91 | * @param $key |
||
92 | * @param $value |
||
93 | * @param array $Options |
||
94 | * @return Bool |
||
95 | */ |
||
96 | 3 | public function set($key, $value, $Options = array()) |
|
100 | |||
101 | /** |
||
102 | * @param $script |
||
103 | * @param array $args |
||
104 | * @param int $numKeys |
||
105 | * @return mixed |
||
106 | */ |
||
107 | 3 | public function evalScript($script, $args = array(), $numKeys = 0) |
|
111 | |||
112 | /** |
||
113 | * @return bool |
||
114 | */ |
||
115 | 3 | public function available() |
|
125 | |||
126 | /** |
||
127 | * @return Driver |
||
128 | * @throws ServerConnectException |
||
129 | * @throws ServersOperateException |
||
130 | */ |
||
131 | 12 | public function getInstance() |
|
136 | } |
||
137 |