cookies = $cookies; } public function setCookieParameter(string $key, string $value, int $expires, string $path): self { $this->cookies[$key] = $value; setcookie($key, $value, $expires, $path); return $this; } public function getCookieParameter(string $key, string $default = null): ?string { return $this->cookies[$key] ?? $default; } }