/** * @param $key * @return Cookie */ public function getCookie($key) { if ($cookieValue = $this->klein->request()->cookies()->get($key)) { $cookie = new Cookie(); $cookie->setName($key); $cookie->setValue($cookieValue); return $cookie; } return null; }