session instanceof SessionEntity) { return $this->session; } /** @var SessionStorage $sessionStorage */ $sessionStorage = $this->server->getSessionStorage(); Assert::isInstanceOf($sessionStorage, SessionStorage::class); return $sessionStorage->getById($this->sessionId); } public function getSessionId(): int { return $this->sessionId; } public function setSession(OriginalSessionEntity $session): self { parent::setSession($session); $this->setSessionId((int)$session->getId()); return $this; } public function setSessionId(int $sessionId): void { $this->sessionId = $sessionId; } }