public function save() { $this->innerSessionStorage->save(); }
/** * {@inheritdoc} */ public function save() { if ($this->isCli()) { // We don't have anything to do if we are not allowed to save the session. return; } if ($this->isSessionObsolete()) { // There is no session data to store, destroy the session if it was // previously started. if ($this->getSaveHandler()->isActive()) { $this->destroy(); } } else { // There is session data to store. Start the session if it is not already // started. if (!$this->getSaveHandler()->isActive()) { $this->startNow(); } // Write the session data. parent::save(); } $this->startedLazy = FALSE; }
/** * {@inheritdoc} */ public function save() { global $user; if (!$this->isEnabled() || $this->isCli()) { // We don't have anything to do if we are not allowed to save the session. return; } if ($user->isAnonymous() && $this->isSessionObsolete()) { // There is no session data to store, destroy the session if it was // previously started. if ($this->getSaveHandler()->isActive()) { session_destroy(); } } else { // There is session data to store. Start the session if it is not already // started. if (!$this->getSaveHandler()->isActive()) { $this->start(); if ($this->requestStack->getCurrentRequest()->isSecure() && $this->isMixedMode()) { $insecure_session_name = $this->getInsecureName(); $params = session_get_cookie_params(); $expire = $params['lifetime'] ? REQUEST_TIME + $params['lifetime'] : 0; $cookie_params = $this->requestStack->getCurrentRequest()->cookies; setcookie($insecure_session_name, $cookie_params->get($insecure_session_name), $expire, $params['path'], $params['domain'], FALSE, $params['httponly']); } } // Write the session data. parent::save(); } $this->startedLazy = FALSE; }