Adds services tagged "needs_destruction" to the "kernel_destruct_subscriber" service.
Expanded class hierarchy of RegisterServicesForDestructionPass
class RegisterServicesForDestructionPass implements CompilerPassInterface {
/**
* Implements \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface::process().
*/
public function process(ContainerBuilder $container) {
if (!$container
->hasDefinition('kernel_destruct_subscriber')) {
return;
}
$definition = $container
->getDefinition('kernel_destruct_subscriber');
$services = $container
->findTaggedServiceIds('needs_destruction');
foreach ($services as $id => $attributes) {
$definition
->addMethodCall('registerService', array(
$id,
));
}
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RegisterServicesForDestructionPass:: |
public | function |
Implements \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface::process(). Overrides CompilerPassInterface:: |