function StackedHttpKernel::terminate
Overrides TerminableInterface::terminate
File
-
core/
lib/ Drupal/ Core/ StackMiddleware/ StackedHttpKernel.php, line 57
Class
- StackedHttpKernel
- Provides a stacked HTTP kernel.
Namespace
Drupal\Core\StackMiddlewareCode
public function terminate(Request $request, Response $response) : void {
$previous = NULL;
foreach ($this->middlewares as $kernel) {
// If the previous kernel was terminable we can assume this middleware
// has already been called.
if (!$previous instanceof TerminableInterface && $kernel instanceof TerminableInterface) {
$kernel->terminate($request, $response);
}
$previous = $kernel;
}
}