sessionId; } public function setSessionId($sessionId) { $this->sessionId = $sessionId; } /** * @inheritdoc * @return static */ public function setSession(OriginalSessionEntity $session) { parent::setSession($session); $this->sessionId = $session->getId(); return $this; } public function getSession(): ?OriginalSessionEntity { if ($this->session instanceof OriginalSessionEntity) { return $this->session; } $sessionStorage = $this->server->getSessionStorage(); if (!$sessionStorage instanceof SessionStorage) { throw new ErrorException('SessionStorage must be instance of ' . SessionStorage::class); } return $sessionStorage->getById($this->sessionId); } }