You are here

public function GuzzleMiddlewarePass::process in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/DependencyInjection/Compiler/GuzzleMiddlewarePass.php \Drupal\Core\DependencyInjection\Compiler\GuzzleMiddlewarePass::process()

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

Parameters

ContainerBuilder $container:

Overrides CompilerPassInterface::process

File

core/lib/Drupal/Core/DependencyInjection/Compiler/GuzzleMiddlewarePass.php, line 18
Contains \Drupal\Core\DependencyInjection\Compiler\GuzzleMiddlewarePass.

Class

GuzzleMiddlewarePass

Namespace

Drupal\Core\DependencyInjection\Compiler

Code

public function process(ContainerBuilder $container) {
  $middleware_ids = array_keys($container
    ->findTaggedServiceIds('http_client_middleware'));
  $container
    ->getDefinition('http_handler_stack_configurator')
    ->addArgument($middleware_ids);
}