1 | <?php |
||
13 | class ClientRegistry |
||
14 | { |
||
15 | /** @var Client[] */ |
||
16 | private $clients; |
||
17 | /** @var ClientConfiguration[] */ |
||
18 | private $configurations; |
||
19 | |||
20 | /** |
||
21 | * ClientRegistry constructor. |
||
22 | */ |
||
23 | 2 | public function __construct() |
|
28 | |||
29 | /** |
||
30 | * @param string $name |
||
31 | * @param array $conf |
||
32 | */ |
||
33 | 2 | public function addClientConfiguration(string $name, array $conf) |
|
42 | |||
43 | /** |
||
44 | * @param string $name |
||
45 | * @param string $databaseName |
||
46 | * |
||
47 | * @return Client |
||
48 | */ |
||
49 | 2 | public function getClientForDatabase(string $name, string $databaseName): Client |
|
53 | |||
54 | /** |
||
55 | * @param string $name |
||
56 | * @param string $databaseName |
||
57 | * |
||
58 | * @return Client |
||
59 | */ |
||
60 | 2 | public function getClient(string $name, string $databaseName = null): Client |
|
73 | } |
||
74 |