public function GuzzleMiddlewarePass::process

public GuzzleMiddlewarePass::process(ContainerBuilder $container)

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 13

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);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!DependencyInjection!Compiler!GuzzleMiddlewarePass.php/function/GuzzleMiddlewarePass::process/8.1.x