Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 6 |
| KernelPreHandle | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 6 |
| __construct | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
|||
| handle | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
|||
| <?php | |
| /** | |
| * @file | |
| * Contains \Drupal\Core\StackMiddleware\KernelPreHandle. | |
| */ | |
| namespace Drupal\Core\StackMiddleware; | |
| use Drupal\Core\DrupalKernelInterface; | |
| use Symfony\Component\HttpFoundation\Request; | |
| use Symfony\Component\HttpKernel\HttpKernelInterface; | |
| /** | |
| * Prepares the environment after page caching ran. | |
| */ | |
| class KernelPreHandle implements HttpKernelInterface { | |
| /** | |
| * The wrapped HTTP kernel. | |
| * | |
| * @var \Symfony\Component\HttpKernel\HttpKernelInterface | |
| */ | |
| protected $httpKernel; | |
| /** | |
| * The main Drupal kernel. | |
| * | |
| * @var \Drupal\Core\DrupalKernelInterface | |
| */ | |
| protected $drupalKernel; | |
| /** | |
| * Constructs a new KernelPreHandle instance. | |
| * | |
| * @param \Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel | |
| * The wrapped HTTP kernel. | |
| * | |
| * @param \Drupal\Core\DrupalKernelInterface $drupal_kernel | |
| * The main Drupal kernel. | |
| */ | |
| public function __construct(HttpKernelInterface $http_kernel, DrupalKernelInterface $drupal_kernel) { | |
| $this->httpKernel = $http_kernel; | |
| $this->drupalKernel = $drupal_kernel; | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) { | |
| $this->drupalKernel->preHandle($request); | |
| return $this->httpKernel->handle($request, $type, $catch); | |
| } | |
| } | |