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

Breadcrumb

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

function MockArraySessionStorage::loadSession

3 calls to MockArraySessionStorage::loadSession()
MockArraySessionStorage::clear in vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php
Clear all session data in memory.
MockArraySessionStorage::start in vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php
Starts the session.
MockFileSessionStorage::read in vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php
Reads session from storage and loads session.

File

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

Class

MockArraySessionStorage
MockArraySessionStorage mocks the session for unit tests.

Namespace

Symfony\Component\HttpFoundation\Session\Storage

Code

protected function loadSession() : void {
    $bags = array_merge($this->bags, [
        $this->metadataBag,
    ]);
    foreach ($bags as $bag) {
        $key = $bag->getStorageKey();
        $this->data[$key] ??= [];
        $bag->initialize($this->data[$key]);
    }
    $this->started = true;
    $this->closed = false;
}

API Navigation

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