1 | <?php |
||
15 | final class Client implements ClientInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var LoopInterface |
||
19 | */ |
||
20 | private $loop; |
||
21 | /** |
||
22 | * @var AsyncClient |
||
23 | */ |
||
24 | private $client; |
||
25 | |||
26 | /** |
||
27 | * @param LoopInterface $loop |
||
28 | * @param AsyncClient $client |
||
29 | */ |
||
30 | private function __construct(LoopInterface $loop, AsyncClient $client) |
||
35 | |||
36 | /** |
||
37 | * @param array $options |
||
38 | * @return Client |
||
39 | */ |
||
40 | public static function create(string $host, array $options = []): self |
||
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | */ |
||
54 | public function APIVersion(): string |
||
61 | |||
62 | /** |
||
63 | * @return string |
||
64 | */ |
||
65 | public function version(): string |
||
72 | |||
73 | /** |
||
74 | * @return string |
||
75 | */ |
||
76 | public function identification(): string |
||
83 | |||
84 | /** |
||
85 | * @return StateInterface |
||
86 | */ |
||
87 | public function state(): StateInterface |
||
94 | |||
95 | /** |
||
96 | * @return string |
||
97 | */ |
||
98 | public function readLog(int $offset = 0, int $length = 0): string |
||
105 | |||
106 | /** |
||
107 | * @return bool |
||
108 | */ |
||
109 | public function clearLog(): bool |
||
116 | |||
117 | /** |
||
118 | * @return int |
||
119 | */ |
||
120 | public function pid(): int |
||
127 | |||
128 | /** |
||
129 | * @return bool |
||
130 | */ |
||
131 | public function restart(): bool |
||
138 | |||
139 | /** |
||
140 | * @return bool |
||
141 | */ |
||
142 | public function shutdown(): bool |
||
149 | |||
150 | /** |
||
151 | * @return array |
||
152 | */ |
||
153 | public function programs(): array |
||
162 | } |
||
163 |