function StackedHttpKernel::terminate
Same name in other branches
- 11.x core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php \Drupal\Core\StackMiddleware\StackedHttpKernel::terminate()
phpcs:ignore Drupal.Commenting.FunctionComment.VoidReturn
Return value
void
File
-
core/
lib/ Drupal/ Core/ StackMiddleware/ StackedHttpKernel.php, line 60
Class
- StackedHttpKernel
- Provides a stacked HTTP kernel.
Namespace
Drupal\Core\StackMiddlewareCode
public function terminate(Request $request, Response $response) {
$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;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.