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

Breadcrumb

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

function MockArraySessionStorage::setId

Overrides SessionStorageInterface::setId

File

vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php, line 85

Class

MockArraySessionStorage
MockArraySessionStorage mocks the session for unit tests.

Namespace

Symfony\Component\HttpFoundation\Session\Storage

Code

public function setId(string $id) : void {
    if ($this->started) {
        throw new \LogicException('Cannot set session ID after the session has started.');
    }
    $this->id = $id;
}

API Navigation

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