| 1 | <?php |
||
| 12 | class Client |
||
| 13 | { |
||
| 14 | /** @var RouterClient */ |
||
| 15 | private $routerClient; |
||
| 16 | |||
| 17 | /** @var ResponseCollection */ |
||
| 18 | private $lastResponse; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Client constructor. |
||
| 22 | * @param string $host |
||
| 23 | * @param string $username |
||
| 24 | * @param string $password |
||
| 25 | * @param int $port |
||
| 26 | * @param int $timeout |
||
| 27 | */ |
||
| 28 | public function __construct(string $host, string $username, string $password, int $port = 8727, int $timeout = 60) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return RouterClient |
||
| 42 | */ |
||
| 43 | public function getRouterClient() |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return array |
||
| 50 | */ |
||
| 51 | public function getActives() |
||
| 55 | |||
| 56 | public function getScripts() |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @param string $command |
||
| 63 | * @return array |
||
| 64 | */ |
||
| 65 | public function execute(string $command) |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @return ResponseCollection |
||
| 83 | */ |
||
| 84 | public function lastResponse(): ResponseCollection |
||
| 88 | } |
||
| 89 |