Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. NullSessionHandler.php

class 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\AbstractSessionHandler implements \Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerInterface, \Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionUpdateTimestampHandlerInterface
    • class \Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler extends \Symfony\Component\HttpFoundation\Session\Storage\Handler\AbstractSessionHandler

Expanded class hierarchy of NullSessionHandler

File

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

Namespace

Symfony\Component\HttpFoundation\Session\Storage\Handler
View source
class NullSessionHandler extends AbstractSessionHandler {
    public function close() : bool {
        return true;
    }
    public function validateId(string $sessionId) : bool {
        return true;
    }
    protected function doRead(string $sessionId) : string {
        return '';
    }
    public function updateTimestamp(string $sessionId, string $data) : bool {
        return true;
    }
    protected function doWrite(string $sessionId, string $data) : bool {
        return true;
    }
    protected function doDestroy(string $sessionId) : bool {
        return true;
    }
    public function gc(int $maxlifetime) : int|false {
        return 0;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
AbstractSessionHandler::$igbinaryEmptyData private property
AbstractSessionHandler::$newSessionId private property
AbstractSessionHandler::$prefetchData private property
AbstractSessionHandler::$prefetchId private property
AbstractSessionHandler::$sessionName private property
AbstractSessionHandler::destroy public function 1
AbstractSessionHandler::open public function 2
AbstractSessionHandler::read public function 1
AbstractSessionHandler::write public function
NullSessionHandler::close public function
NullSessionHandler::doDestroy protected function Overrides AbstractSessionHandler::doDestroy
NullSessionHandler::doRead protected function Overrides AbstractSessionHandler::doRead
NullSessionHandler::doWrite protected function Overrides AbstractSessionHandler::doWrite
NullSessionHandler::gc public function
NullSessionHandler::updateTimestamp public function
NullSessionHandler::validateId public function Overrides AbstractSessionHandler::validateId

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal