cookies === null) { $this->cookies = Cookies::fromRequest($this->getRequest()); } return $this->cookies; } public function getCookie($name): ?Cookie { return $this->getCookies()->get($name); } public function getCookieValue(string $name, string $default = ""): string { $cookie = $this->getCookie($name); if ($cookie !== null) { return $cookie->getValue(); } return $default; } }