You are here

public function CheckExceptionOnInvalidReferenceBehaviorPass::process in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php \Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass::process()

You can modify the container here before it is dumped to PHP code.

@api

Parameters

ContainerBuilder $container:

Overrides CompilerPassInterface::process

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php, line 30

Class

CheckExceptionOnInvalidReferenceBehaviorPass
Checks that all references are pointing to a valid service.

Namespace

Symfony\Component\DependencyInjection\Compiler

Code

public function process(ContainerBuilder $container) {
  $this->container = $container;
  foreach ($container
    ->getDefinitions() as $id => $definition) {
    $this->sourceId = $id;
    $this
      ->processDefinition($definition);
  }
}