Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. StackedHttpKernel.php

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\StackMiddleware

Code

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;
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal