private function setCookie(string $name, $value)
    {
        $expiry = $this->transient ? 0 : (time() + 2629743);
        $sessionParameters = session_get_cookie_params();
        setcookie(
            $name,
            $value,
            $expiry,
            '/',
            $sessionParameters['domain'],
            $this->secure,
            true
        );
    }