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

Breadcrumb

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

function AbstractSessionHandler::read

3 calls to AbstractSessionHandler::read()
AbstractSessionHandler::validateId in vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php
PdoSessionHandler::read in vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php
PdoSessionHandler::read in vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php
1 method overrides AbstractSessionHandler::read()
PdoSessionHandler::read in vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php

File

vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php, line 55

Class

AbstractSessionHandler
This abstract session handler provides a generic implementation of the PHP 7.0 SessionUpdateTimestampHandlerInterface, enabling strict and lazy session handling.

Namespace

Symfony\Component\HttpFoundation\Session\Storage\Handler

Code

public function read(string $sessionId) : string {
    if (isset($this->prefetchId)) {
        $prefetchId = $this->prefetchId;
        $prefetchData = $this->prefetchData;
        unset($this->prefetchId, $this->prefetchData);
        if ($prefetchId === $sessionId || '' === $prefetchData) {
            $this->newSessionId = '' === $prefetchData ? $sessionId : null;
            return $prefetchData;
        }
    }
    $data = $this->doRead($sessionId);
    $this->newSessionId = '' === $data ? $sessionId : null;
    return $data;
}

API Navigation

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