function StackedHttpKernel::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php \Drupal\Core\StackMiddleware\StackedHttpKernel::__construct()
- 10 core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php \Drupal\Core\StackMiddleware\StackedHttpKernel::__construct()
Constructs a stacked HTTP kernel.
Parameters
\Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel: The decorated kernel.
iterable<\Symfony\Component\HttpKernel\HttpKernelInterface> $middlewares: An array of previous middleware services.
File
-
core/
lib/ Drupal/ Core/ StackMiddleware/ StackedHttpKernel.php, line 42
Class
- StackedHttpKernel
- Provides a stacked HTTP kernel.
Namespace
Drupal\Core\StackMiddlewareCode
public function __construct(HttpKernelInterface $http_kernel, iterable $middlewares) {
if (is_array($middlewares)) {
throw new \TypeError('The middlewares argument must be a lazy iterator, ' . gettype($middlewares) . ' given.');
}
$this->httpKernel = $http_kernel;
$this->middlewares = $middlewares;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.