You are here

protected function MockArraySessionStorage::loadSession in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php \Symfony\Component\HttpFoundation\Session\Storage\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 255

Class

MockArraySessionStorage
MockArraySessionStorage mocks the session for unit tests.

Namespace

Symfony\Component\HttpFoundation\Session\Storage

Code

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