You are here

public function AbstractProxy::setId in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php \Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy::setId()

Sets the session ID.

Parameters

string $id:

Throws

\LogicException

File

vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php, line 120

Class

AbstractProxy
AbstractProxy.

Namespace

Symfony\Component\HttpFoundation\Session\Storage\Proxy

Code

public function setId($id) {
  if ($this
    ->isActive()) {
    throw new \LogicException('Cannot change the ID of an active session');
  }
  session_id($id);
}