protected function UpdateKernel::bootSession

protected UpdateKernel::bootSession(Request $request)

Boots up the session.

bootSession() + shutdownSession() basically simulates what \Drupal\Core\StackMiddleware\Session does.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The incoming request.

File

core/lib/Drupal/Core/Update/UpdateKernel.php, line 122

Class

UpdateKernel
Defines a kernel which is used primarily to run the update of Drupal.

Namespace

Drupal\Core\Update

Code

protected function bootSession(Request $request) {
  $container = $this->getContainer();
  /** @var \Symfony\Component\HttpFoundation\Session\SessionInterface $session */
  $session = $container->get('session');
  $session->start();
  $request->setSession($session);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Update!UpdateKernel.php/function/UpdateKernel::bootSession/8.1.x