KernelPreHandle.php in Drupal 10
File
core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php
View source
<?php
namespace Drupal\Core\StackMiddleware;
use Drupal\Core\DrupalKernelInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelInterface;
class KernelPreHandle implements HttpKernelInterface {
protected $httpKernel;
protected $drupalKernel;
public function __construct(HttpKernelInterface $http_kernel, DrupalKernelInterface $drupal_kernel) {
$this->httpKernel = $http_kernel;
$this->drupalKernel = $drupal_kernel;
}
public function handle(Request $request, $type = self::MAIN_REQUEST, $catch = TRUE) : Response {
$this->drupalKernel
->preHandle($request);
return $this->httpKernel
->handle($request, $type, $catch);
}
}