class RemoveAbstractDefinitionsPass in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Compiler/RemoveAbstractDefinitionsPass.php \Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass
Removes abstract Definitions.
Hierarchy
- class \Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass implements CompilerPassInterface
Expanded class hierarchy of RemoveAbstractDefinitionsPass
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Compiler/ RemoveAbstractDefinitionsPass.php, line 19
Namespace
Symfony\Component\DependencyInjection\CompilerView source
class RemoveAbstractDefinitionsPass implements CompilerPassInterface {
/**
* Removes abstract definitions from the ContainerBuilder.
*
* @param ContainerBuilder $container
*/
public function process(ContainerBuilder $container) {
$compiler = $container
->getCompiler();
$formatter = $compiler
->getLoggingFormatter();
foreach ($container
->getDefinitions() as $id => $definition) {
if ($definition
->isAbstract()) {
$container
->removeDefinition($id);
$compiler
->addLogMessage($formatter
->formatRemoveService($this, $id, 'abstract'));
}
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RemoveAbstractDefinitionsPass:: |
public | function |
Removes abstract definitions from the ContainerBuilder. Overrides CompilerPassInterface:: |