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

Breadcrumb

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

function AbstractSessionHandler::write

1 call to AbstractSessionHandler::write()
StrictSessionHandler::updateTimestamp in vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php

File

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

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 write(string $sessionId, string $data) : bool {
    // see https://github.com/igbinary/igbinary/issues/146
    $this->igbinaryEmptyData ??= \function_exists('igbinary_serialize') ? igbinary_serialize([]) : '';
    if ('' === $data || $this->igbinaryEmptyData === $data) {
        return $this->destroy($sessionId);
    }
    $this->newSessionId = null;
    return $this->doWrite($sessionId, $data);
}

API Navigation

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