isSessionObsolete example



  /** * {@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();
      }
Home | Imprint | This part of the site doesn't use cookies.