public function addCookie(CookieInterface $cookie)
    {
        if (!$cookie->getDomain() || !$cookie->getPath()) {
            throw new InvalidArgumentException('Cookie must have a domain and a path set.');
        }
        $this->_cookies = $this->_cookies->add($cookie);

        return $this;
    }
public function addCookie(CookieInterface $cookie)
    {
        if (!$cookie->getDomain() || !$cookie->getPath()) {
            throw new InvalidArgumentException('Cookie must have a domain and a path set.');
        }
        $this->_cookies = $this->_cookies->add($cookie);

        return $this;
    }
public function addCookie ( CookieInterface $ cookie ) { if ( ! $ cookie -> getDomain ( ) || ! $ cookie -> getPath ( ) ) { throw new InvalidArgumentException ( 'Cookie must have a domain and a path set.' ) ; } $ this -> _cookies = $ this -> _cookies -> add ( $ cookie ) ; return $ this ; }
Adds a cookie to the Client collection.

@param \Cake\Http\Cookie\CookieInterface $cookie Cookie object.
@return $this
Adds a cookie to the Client collection .