@@ 119-125 (lines=7) @@ | ||
116 | $this->containerBuilder->setDefinition('mongo.client_registry', $clientRegistryDefinition); |
|
117 | } |
|
118 | ||
119 | private function defineConnectionFactory() |
|
120 | { |
|
121 | $factoryDefinition = new Definition(ConnectionFactory::class, [new Reference('mongo.client_registry')]); |
|
122 | $factoryDefinition->setPublic(false); |
|
123 | ||
124 | $this->containerBuilder->setDefinition('mongo.connection_factory', $factoryDefinition); |
|
125 | } |
|
126 | ||
127 | /** |
|
128 | * @param array $connections |
|
@@ 155-166 (lines=12) @@ | ||
152 | $this->containerBuilder->setDefinition('facile_mongo_db.event_dispatcher', $eventManagerDefinition); |
|
153 | } |
|
154 | ||
155 | private function defineDataCollectorListeners() |
|
156 | { |
|
157 | $dataCollectorListenerDefinition = new Definition( |
|
158 | DataCollectorListener::class, |
|
159 | [ |
|
160 | new Reference('facile_mongo_db.logger') |
|
161 | ] |
|
162 | ); |
|
163 | $dataCollectorListenerDefinition->setPublic(false); |
|
164 | ||
165 | $this->containerBuilder->setDefinition('facile_mongo_db.data_collector.listener', $dataCollectorListenerDefinition); |
|
166 | } |
|
167 | ||
168 | private function attachDataCollectionListenerToEventManager() |
|
169 | { |
|
@@ 196-205 (lines=10) @@ | ||
193 | $this->containerBuilder->setDefinition('facile_mongo_db.twig_extesion', $extension); |
|
194 | } |
|
195 | ||
196 | private function defineExplainQueryService() |
|
197 | { |
|
198 | $explainServiceDefinition = new Definition( |
|
199 | ExplainQueryService::class, |
|
200 | [new Reference('mongo.client_registry')] |
|
201 | ); |
|
202 | $explainServiceDefinition->setPublic(true); |
|
203 | ||
204 | $this->containerBuilder->setDefinition('mongo.explain_query_service', $explainServiceDefinition); |
|
205 | } |
|
206 | ||
207 | private function defineCommands() |
|
208 | { |