Conditions | 4 |
Paths | 6 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function process(ContainerBuilder $container) |
||
19 | { |
||
20 | $config = $container->getExtensionConfig('ozean12_google_pub_sub'); |
||
21 | $loggerChannel = isset($config[0]['logger_channel']) ? $config[0]['logger_channel'] : null; |
||
22 | $loggerId = 'monolog.logger.'.$loggerChannel; |
||
23 | |||
24 | if (is_null($loggerChannel)) { |
||
25 | return; |
||
26 | } |
||
27 | |||
28 | foreach ($container->findTaggedServiceIds(Ozean12GooglePubSubExtension::TAG_NAME) as $taggedServiceId => $tags) { |
||
29 | $container |
||
30 | ->getDefinition($taggedServiceId) |
||
31 | ->addMethodCall('setLogger', [new Reference($loggerId)]) |
||
32 | ; |
||
33 | } |
||
34 | } |
||
35 | } |
||
36 |