vendor/gos/pubsub-router-bundle/GosPubSubRouterBundle.php line 13

Open in your IDE?
  1. <?php
  2. namespace Gos\Bundle\PubSubRouterBundle;
  3. use Gos\Bundle\PubSubRouterBundle\DependencyInjection\CompilerPass\RouterCompilerPass;
  4. use Gos\Bundle\PubSubRouterBundle\DependencyInjection\GosPubSubRouterExtension;
  5. use Symfony\Component\DependencyInjection\ContainerBuilder;
  6. use Symfony\Component\HttpKernel\Bundle\Bundle;
  7. /**
  8.  * @author Johann Saunier <johann_27@hotmail.fr>
  9.  */
  10. class GosPubSubRouterBundle extends Bundle
  11. {
  12.     /**
  13.      * {@inheritdoc}
  14.      */
  15.     public function boot()
  16.     {
  17.         $registeredRouter $this->container->getParameter('gos_pubsub_registered_routers');
  18.         foreach ($registeredRouter as $routerType) {
  19.             $routeLoader $this->container->get('gos_pubsub_router.loader.' $routerType);
  20.             $routeLoader->load();
  21.         }
  22.     }
  23.     /**
  24.      * {@inheritdoc}
  25.      */
  26.     public function build(ContainerBuilder $container)
  27.     {
  28.         parent::build($container);
  29.         $container->addCompilerPass(new RouterCompilerPass());
  30.     }
  31.     /**
  32.      * {@inheritdoc}
  33.      */
  34.     public function getContainerExtension()
  35.     {
  36.         return new GosPubSubRouterExtension();
  37.     }
  38. }