@@ 56-63 (lines=8) @@ | ||
53 | $this->containerBuilder->setDefinition('facile_mongo_db.logger', $loggerDefinition); |
|
54 | } |
|
55 | ||
56 | private function defineDataCollector() |
|
57 | { |
|
58 | $dataCollectorDefinition = new Definition(MongoDbDataCollector::class); |
|
59 | $dataCollectorDefinition->addMethodCall('setLogger', [new Reference('facile_mongo_db.logger')]); |
|
60 | $dataCollectorDefinition->setPublic(false); |
|
61 | ||
62 | $this->containerBuilder->setDefinition('facile_mongo_db.data_collector', $dataCollectorDefinition); |
|
63 | } |
|
64 | ||
65 | /** |
|
66 | * @param array $clientsConfig |
|
@@ 69-82 (lines=14) @@ | ||
66 | * @param array $clientsConfig |
|
67 | * @param string $environment |
|
68 | */ |
|
69 | private function defineClientRegistry(array $clientsConfig, string $environment) |
|
70 | { |
|
71 | $clientRegistryDefinition = new Definition( |
|
72 | ClientRegistry::class, |
|
73 | [ |
|
74 | new Reference('facile_mongo_db.logger'), |
|
75 | $environment, |
|
76 | ] |
|
77 | ); |
|
78 | $clientRegistryDefinition->addMethodCall('addClientsConfigurations', [$clientsConfig]); |
|
79 | $clientRegistryDefinition->setPublic(false); |
|
80 | ||
81 | $this->containerBuilder->setDefinition('mongo.client_registry', $clientRegistryDefinition); |
|
82 | } |
|
83 | ||
84 | private function defineConnectionFactory() |
|
85 | { |