| 1 | <?php |
||
| 7 | final class ClientRegistry implements ClientRegistryInterface |
||
| 8 | { |
||
| 9 | /** @var RpcClientInterface[] */ |
||
| 10 | private $clients = []; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @param string $name |
||
| 14 | * |
||
| 15 | * @return RpcClientInterface |
||
| 16 | * @throws \OutOfBoundsException |
||
| 17 | */ |
||
| 18 | 18 | public function get($name) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @param string $name |
||
| 29 | * |
||
| 30 | * @return bool |
||
| 31 | */ |
||
| 32 | 18 | public function has($name) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @param string $name |
||
| 39 | * @param RpcClientInterface $client |
||
| 40 | * |
||
| 41 | * @return void |
||
| 42 | * @throws \InvalidArgumentException |
||
| 43 | */ |
||
| 44 | 18 | public function add($name, RpcClientInterface $client) |
|
| 52 | |||
| 53 | /** |
||
| 54 | * @param string $name |
||
| 55 | * @param RpcClientInterface $client |
||
| 56 | * |
||
| 57 | * @return void |
||
| 58 | */ |
||
| 59 | 18 | public function replace($name, RpcClientInterface $client) |
|
| 63 | |||
| 64 | /** |
||
| 65 | * @return RpcClientInterface[] |
||
| 66 | */ |
||
| 67 | public function all() |
||
| 71 | } |
||
| 72 |