Ejemplo n.º 1
0
 /**
  * Destroys the session.
  *
  * @return void
  */
 public function destroy()
 {
     $this->storage->delete($this->getStorageKey());
     $this->data = array();
     $this->isLoaded = false;
     $this->id = null;
 }
Ejemplo n.º 2
0
 /**
  * Returns the stored data.
  *
  * @return string|bool   The stored data or FALSE if its not stored.
  */
 private function getFromStorage()
 {
     if ($this->storage === null) {
         return false;
     }
     return $this->storage->get($this->storageKey);
 }
Ejemplo n.º 3
0
 /**
  * Called at script shutdown if the shutdown is because of a fatal error.
  *
  * @param int    $errorLevel   The error code {@uses E_*}
  * @param string $message      The error message.
  * @param string $file         The file where the error occured.
  * @param int    $line         The line in the file where the error occured.
  * @param string $errorId      The internal ID of the error.
  *
  * @return void
  */
 public function handleShutdown($errorLevel, $message, $file, $line, $errorId)
 {
     if (false !== $this->storage->get($errorId)) {
         // Only save the debug info, if it's not already saved
         return;
     }
     $helper = new ErrorHandlerHelper();
     $errorLevelDescription = $helper->getPhpErrorLevelDescription($errorLevel);
     $errorMessage = '[' . $errorLevelDescription . '(' . $errorLevel . ')]: ' . $message . ' on line ' . $line . ' in ' . $file;
     $this->storage->set($errorId, $this->getDebugData($errorId, $errorMessage));
 }