public function DrupalKernel::terminate in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/DrupalKernel.php \Drupal\Core\DrupalKernel::terminate()
Terminates a request/response cycle.
Should be called after sending the response and before shutting down the kernel.
Parameters
Request $request A Request instance:
Response $response A Response instance:
Overrides TerminableInterface::terminate
File
- core/
lib/ Drupal/ Core/ DrupalKernel.php, line 607 - Contains \Drupal\Core\DrupalKernel.
Class
- DrupalKernel
- The DrupalKernel class is the core of Drupal itself.
Namespace
Drupal\CoreCode
public function terminate(Request $request, Response $response) {
// Only run terminate() when essential services have been set up properly
// by preHandle() before.
if (FALSE === $this->prepared) {
return;
}
if ($this
->getHttpKernel() instanceof TerminableInterface) {
$this
->getHttpKernel()
->terminate($request, $response);
}
}