public function BootstrapCompilerPass::process

master BootstrapCompilerPass.php public BootstrapCompilerPass::process(ContainerBuilder $container)

File

lib/Drush/Symfony/BootstrapCompilerPass.php, line 11

Namespace

Drush\Symfony

Class

BootstrapCompilerPass

Code

public function process(ContainerBuilder $container) {
  if (!$container->has('bootstrap.manager')) {
    return;
  }

  $definition = $container->findDefinition('bootstrap.manager');

  $taggedServices = $container->findTaggedServiceIds('bootstrap.boot');
  foreach ($taggedServices as $id => $tags) {
    $definition->addMethodCall('add', array(new Reference($id)));
  }
}