You are here

public function HandlerStackConfigurator::configure in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Http/HandlerStackConfigurator.php \Drupal\Core\Http\HandlerStackConfigurator::configure()

Configures the stack using services tagged as http_client_middleware.

Parameters

\GuzzleHttp\HandlerStack $handler_stack: The handler stack

File

core/lib/Drupal/Core/Http/HandlerStackConfigurator.php, line 87
Contains \Drupal\Core\Http\HandlerStackConfigurator.

Class

HandlerStackConfigurator
Defines a class for configuring middlewares on the http handler stack.

Namespace

Drupal\Core\Http

Code

public function configure(HandlerStack $handler_stack) {
  $this
    ->initializeMiddlewares();
  foreach ($this->middlewares as $middleware_id => $middleware) {
    $handler_stack
      ->push($middleware, $middleware_id);
  }
}