1 | <?php |
||
14 | final class ConnectionRegistry |
||
15 | { |
||
16 | /** @var Client[] */ |
||
17 | private $connections; |
||
18 | |||
19 | /** |
||
20 | * ConnectionRegistry constructor. |
||
21 | */ |
||
22 | 2 | public function __construct() |
|
26 | |||
27 | /** |
||
28 | * @param string $clientIdentifier |
||
29 | * |
||
30 | * @return Client |
||
31 | * |
||
32 | * @throws ClientNotFoundException |
||
33 | */ |
||
34 | 1 | public function getClient(string $clientIdentifier): Client |
|
43 | |||
44 | /** |
||
45 | * @param string $clientIdentifier |
||
46 | * @param Client $client |
||
47 | * |
||
48 | * @throws ExistantClientException |
||
49 | */ |
||
50 | 2 | public function addClient(string $clientIdentifier, Client $client) |
|
58 | |||
59 | /** |
||
60 | * @param string $clientIdentifier |
||
61 | * |
||
62 | * @return bool |
||
63 | */ |
||
64 | 2 | public function hasClient(string $clientIdentifier): bool |
|
68 | } |
||
69 |