![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mautic.corals.io/vendor/php-amqplib/rabbitmq-bundle/ |
<?php namespace OldSound\RabbitMqBundle; use OldSound\RabbitMqBundle\DependencyInjection\Compiler\InjectEventDispatcherPass; use OldSound\RabbitMqBundle\DependencyInjection\Compiler\RegisterPartsPass; use OldSound\RabbitMqBundle\DependencyInjection\Compiler\ServiceContainerPass; use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\DependencyInjection\ContainerBuilder; class OldSoundRabbitMqBundle extends Bundle { public function build(ContainerBuilder $container): void { parent::build($container); $container->addCompilerPass(new RegisterPartsPass()); $container->addCompilerPass(new InjectEventDispatcherPass()); $container->addCompilerPass(new ServiceContainerPass()); } /** * {@inheritDoc} */ public function shutdown(): void { parent::shutdown(); if (!$this->container->hasParameter('old_sound_rabbit_mq.base_amqp')) { return; } $connections = $this->container->getParameter('old_sound_rabbit_mq.base_amqp'); foreach ($connections as $connection) { if ($this->container->initialized($connection)) { $this->container->get($connection)->close(); } } } }