Beispiel #1
0
 /**
  * Starts the sesssion
  *
  * @return NULL
  * @throws spriebsch\session\SessionException Session has already been started
  */
 public function start()
 {
     if ($this->isStarted()) {
         throw new SessionException('Session has already been started', SessionException::SESSION_ALREADY_STARTED);
     }
     if (!$this->isConfigured) {
         throw new SessionException('Session has not been configured', SessionException::SESSION_NOT_CONFIGURED);
     }
     $this->backend->startSession($this->name, $this->lifetime, $this->path, $this->domain, $this->isSecure, TRUE);
     $this->data = $this->backend->read();
     $this->isStarted = TRUE;
 }