1 | <?php |
||
6 | class HelloResponse extends BaseResponse implements ResponseInterface |
||
7 | { |
||
8 | /** |
||
9 | * Array keys |
||
10 | */ |
||
11 | const NODE_ID = 'id'; |
||
12 | const NODE_HOST = 'host'; |
||
13 | const NODE_PORT = 'port'; |
||
14 | const NODE_VERSION = 'version'; |
||
15 | const NODE_PRIORITY = 'priority'; |
||
16 | const NODES = 'nodes'; |
||
17 | |||
18 | /** |
||
19 | * Position indexes in the Disque response |
||
20 | */ |
||
21 | const POS_VERSION = 0; |
||
22 | const POS_ID = 1; |
||
23 | const POS_NODES_START = 2; |
||
24 | |||
25 | const POS_NODE_ID = 0; |
||
26 | const POS_NODE_HOST = 1; |
||
27 | const POS_NODE_PORT = 2; |
||
28 | const POS_NODE_PRIORITY = 3; |
||
29 | |||
30 | use ArrayChecker; |
||
31 | |||
32 | /** |
||
33 | * Set response body |
||
34 | * |
||
35 | * @param mixed $body Response body |
||
36 | * @return void |
||
37 | * @throws InvalidResponseException |
||
38 | */ |
||
39 | public function setBody($body) |
||
51 | |||
52 | /** |
||
53 | * Parse response |
||
54 | * |
||
55 | * @return array Parsed response |
||
56 | */ |
||
57 | public function parse() |
||
75 | |||
76 | } |
||
77 |