You are here

public function MockArraySessionStorage::setId 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::setId()

Sets the session ID.

Parameters

string $id:

Overrides SessionStorageInterface::setId

File

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

Class

MockArraySessionStorage
MockArraySessionStorage mocks the session for unit tests.

Namespace

Symfony\Component\HttpFoundation\Session\Storage

Code

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