class NullSessionHandler

NullSessionHandler.

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

@author Drak <drak@zikula.org>

@api

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 drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php
NullSessionHandlerTest.php in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.php, line 23

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($lifetime) {
    return true;
  }

}

Members