<?php<liu21st@gmail.com>namespace think\swoole;
use Swoole\Http\Response;
use think\Cookie as BaseCookie;
class Cookie extends BaseCookie
{
protected $response;
public function init(array $config = [])
{
$this->config = array_merge($this->config, array_change_key_case($config));
}
public function setResponse(Response $response)
{
$this->response = $response;
}
protected function setCookie($name, $value, $expire, $option = [])
{
$this->response->cookie($name, $value, $expire, $option['path'], $option['domain'], $option['secure'], $option['httponly']);
}
}