zendframework/zf2 — pull request #3287 by iwalz (2012-12-24 19:03:08+00:00)
Title: Added missing constructor parameter

Is someone working on the cookie stuff? If I understand it correct, Zend\Http\Cookie and Zend\Http\Client\Cookie should handle Header\Cookie and Header\SetCookie - but it looks like there are a few copy & paste issues here.

E.g. [this](https://github.com/zendframework/zf2/blob/develop/library/Zend/Http/Client/Cookies.php#L107) will always fail:

```php
if ($cookie instanceof Cookie) {
$domain = $cookie->getDomain();
$path = $cookie->getPath();
if (!isset($this->cookies[$domain])) {
$this->cookies[$domain] = array();
}
if (!isset($this->cookies[$domain][$path])) {
$this->cookies[$domain][$path] = array();
}
$this->cookies[$domain][$path][$cookie->getName()] = $cookie;
$this->rawCookies[] = $cookie;
} else {
throw new Exception\InvalidArgumentException('Supplient argument is not a valid cookie string or object');
}
```

Cause Cookie does not have the method "getDomain" (same with getPath) - but SetCookie has that method. From the [internal architecture](https://github.com/zendframework/zf2/blob/develop/library/Zend/Http/Client/Cookies.php#L115) I guess Cookie needs this method.