public function setCookie(string $name, string $value, array $flags = []) : Response
{
if ($this->state & self::STARTED) {
throw new \LogicException("Cannot set header; output already started");
}
// @TODO assert() valid $name / $value / $flags
$this->cookies[$name] = [$value, $flags];
return $this;
}