public function getSession(): SessionInterface
{ $session =
$this->session;
if (!
$session instanceof SessionInterface && null !==
$session) { $this->
setSession($session =
$session());
} if (null ===
$session) { throw new SessionNotFoundException('Session has not been set.'
);
} return $session;
} /**
* Whether the request contains a Session which was started in one of the
* previous requests.
*/
public function hasPreviousSession(): bool
{