91b35807e8e42f575356ba854c607085c5458e05
[yaffs-website] / GuzzleMiddlewarePass.php
1 <?php
2
3 namespace Drupal\Core\DependencyInjection\Compiler;
4
5 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6 use Symfony\Component\DependencyInjection\ContainerBuilder;
7
8 class GuzzleMiddlewarePass implements CompilerPassInterface {
9
10   /**
11    * {@inheritdoc}
12    */
13   public function process(ContainerBuilder $container) {
14     $middleware_ids = array_keys($container->findTaggedServiceIds('http_client_middleware'));
15     $container->getDefinition('http_handler_stack_configurator')
16       ->addArgument($middleware_ids);
17   }
18
19 }