public function MockFileSessionStorage::start

Starts the session.

@api

Return value

boolean True if started.

Throws

\RuntimeException If something goes wrong starting the session.

Overrides MockArraySessionStorage::start

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

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php, line 62

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;
}