protected function setCookieInResponse(Cookie $cookie)
    {
        $method = $cookie->isRaw() ? 'rawcookie' : 'cookie';

        $this->response->$method(
            $cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(),
            $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly()
        );
    }