1 | <?php |
||
6 | class Node { |
||
7 | |||
8 | const STREAM_TIMEOUT = 10; |
||
9 | |||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | private $host; |
||
14 | |||
15 | /** |
||
16 | * @var int |
||
17 | */ |
||
18 | private $port = 9042; |
||
19 | |||
20 | /** |
||
21 | * @var resource |
||
22 | */ |
||
23 | private $socket; |
||
24 | |||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | private $options = [ |
||
29 | 'username' => null, |
||
30 | 'password' => null |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * @param string $host |
||
35 | * @param array $options |
||
36 | * @throws \InvalidArgumentException |
||
37 | */ |
||
38 | public function __construct($host, array $options = []) { |
||
49 | |||
50 | /** |
||
51 | * @return resource |
||
52 | * @throws \Exception |
||
53 | */ |
||
54 | public function getConnection() { |
||
66 | |||
67 | /** |
||
68 | * @return array |
||
69 | */ |
||
70 | public function getOptions() { |
||
73 | } |