/**
  * @param Symfony\Components\DependencyInjection\ContainerInterface $container
  */
 public function __construct(ContainerInterface $container)
 {
     foreach ($container->findAnnotatedServiceIds('server.request_handler') as $id => $attributes) {
         $container->getService($id)->register($this);
     }
     foreach ($container->findAnnotatedServiceIds('server.response_filter') as $id => $attributes) {
         $container->getService($id)->register($this);
     }
 }
Exemple #2
0
 public function __construct(ContainerInterface $container, \Twig_LoaderInterface $loader = null, $options = array())
 {
     parent::__construct($loader, $options);
     foreach ($container->findAnnotatedServiceIds('twig.extension') as $id => $attributes) {
         $this->addExtension($container->getService($id));
     }
 }
Exemple #3
0
 public function __construct(ContainerInterface $container)
 {
     foreach ($container->findAnnotatedServiceIds('kernel.listener') as $id => $attributes) {
         $container->getService($id)->register($this);
     }
 }