public function SessionTestSubscriber::onKernelRequestSessionTest

Set header for session testing.

Parameters

\Symfony\Component\HttpKernel\Event\GetResponseEvent $event: The Event to process.

File

drupal/core/modules/system/tests/modules/session_test/lib/Drupal/session_test/EventSubscriber/SessionTestSubscriber.php, line 31
Contains \Drupal\session_test\EventSubscriber\SessionTestSubscriber.

Class

SessionTestSubscriber
Defines a test session subscriber that checks whether the session is empty.

Namespace

Drupal\session_test\EventSubscriber

Code

public function onKernelRequestSessionTest(GetResponseEvent $event) {
  $this->emptySession = intval(empty($_SESSION));
}