You are here

class NullSessionHandler in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php \Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler

NullSessionHandler.

Can be used in unit testing or in a situations where persisted sessions are not desired.

@author Drak <drak@zikula.org>

Hierarchy

  • class \Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler implements \Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerInterface

Expanded class hierarchy of NullSessionHandler

2 files declare their use of NullSessionHandler
NativeSessionStorageTest.php in vendor/symfony/http-foundation/Tests/Session/Storage/NativeSessionStorageTest.php
NullSessionHandlerTest.php in vendor/symfony/http-foundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php

File

vendor/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php, line 21

Namespace

Symfony\Component\HttpFoundation\Session\Storage\Handler
View source
class NullSessionHandler implements \SessionHandlerInterface {

  /**
   * {@inheritdoc}
   */
  public function open($savePath, $sessionName) {
    return true;
  }

  /**
   * {@inheritdoc}
   */
  public function close() {
    return true;
  }

  /**
   * {@inheritdoc}
   */
  public function read($sessionId) {
    return '';
  }

  /**
   * {@inheritdoc}
   */
  public function write($sessionId, $data) {
    return true;
  }

  /**
   * {@inheritdoc}
   */
  public function destroy($sessionId) {
    return true;
  }

  /**
   * {@inheritdoc}
   */
  public function gc($maxlifetime) {
    return true;
  }

}

Members