Exemplo n.º 1
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->get($id));
     }
 }
Exemplo n.º 2
0
 public function __construct(ContainerInterface $container)
 {
     foreach ($container->findAnnotatedServiceIds('kernel.listener') as $id => $attributes) {
         $container->get($id)->register($this);
     }
 }