1 | <?php |
||
7 | class Response |
||
8 | { |
||
9 | /** |
||
10 | * @var int |
||
11 | */ |
||
12 | private $deviceId; |
||
13 | |||
14 | /** |
||
15 | * @var array |
||
16 | */ |
||
17 | private $result = []; |
||
18 | |||
19 | /** |
||
20 | * @var BulbCommandException|null |
||
21 | */ |
||
22 | private $exception = null; |
||
23 | |||
24 | /** |
||
25 | * Response constructor. |
||
26 | * |
||
27 | * @param array $response |
||
28 | */ |
||
29 | public function __construct(array $response) |
||
42 | |||
43 | /** |
||
44 | * @return int |
||
45 | */ |
||
46 | public function getDeviceId(): int |
||
50 | |||
51 | /** |
||
52 | * @return array |
||
53 | */ |
||
54 | public function getResult(): array |
||
58 | |||
59 | /** |
||
60 | * @return null|BulbCommandException |
||
61 | */ |
||
62 | public function getException() |
||
66 | |||
67 | /** |
||
68 | * @return bool |
||
69 | */ |
||
70 | public function isSuccess(): bool |
||
74 | } |
||
75 |