vendor/gos/pubsub-router-bundle/src/GosPubSubRouterBundle.php line 15

Open in your IDE?
  1. <?php
  2. namespace Gos\Bundle\PubSubRouterBundle;
  3. use Gos\Bundle\PubSubRouterBundle\DependencyInjection\CompilerPass\RoutingResolverPass;
  4. use Gos\Bundle\PubSubRouterBundle\DependencyInjection\GosPubSubRouterExtension;
  5. use Symfony\Component\DependencyInjection\ContainerBuilder;
  6. use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
  7. use Symfony\Component\HttpKernel\Bundle\Bundle;
  8. /**
  9.  * @author Johann Saunier <johann_27@hotmail.fr>
  10.  * @final
  11.  */
  12. class GosPubSubRouterBundle extends Bundle
  13. {
  14.     public function build(ContainerBuilder $container): void
  15.     {
  16.         parent::build($container);
  17.         $container->addCompilerPass(new RoutingResolverPass());
  18.     }
  19.     public function getContainerExtension(): ?ExtensionInterface
  20.     {
  21.         if (null === $this->extension) {
  22.             $this->extension = new GosPubSubRouterExtension();
  23.         }
  24.         return parent::getContainerExtension();
  25.     }
  26.     public function getPath(): string
  27.     {
  28.         return \dirname(__DIR__);
  29.     }
  30. }