You are here

public function MockFileSessionStorage::start in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php \Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage::start()

Starts the session.

Return value

bool True if started.

Throws

\RuntimeException If something goes wrong starting the session.

Overrides MockArraySessionStorage::start

1 call to MockFileSessionStorage::start()
MockFileSessionStorage::regenerate in vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php
Regenerates id that represents this storage.

File

vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php, line 57

Class

MockFileSessionStorage
MockFileSessionStorage is used to mock sessions for functional testing when done in a single PHP process.

Namespace

Symfony\Component\HttpFoundation\Session\Storage

Code

public function start() {
  if ($this->started) {
    return true;
  }
  if (!$this->id) {
    $this->id = $this
      ->generateId();
  }
  $this
    ->read();
  $this->started = true;
  return true;
}