http.php
public function writeCookiesToJar($jar, $url)
    {
        foreach ($this->cookies as $cookie) {
            $jar->setCookie(
                    $cookie->getName(),
                    $cookie->getValue(),
                    $url->getHost(),
                    $cookie->getPath(),
                    $cookie->getExpiry());
        }
    }
public function writeCookiesToJar($jar, $url)
    {
        foreach ($this->cookies as $cookie) {
            $jar->setCookie(
                    $cookie->getName(),
                    $cookie->getValue(),
                    $url->getHost(),
                    $cookie->getPath(),
                    $cookie->getExpiry());
        }
    }
Writes new cookies to the cookie jar.

@param SimpleCookieJar $jar   Jar to write to.
@param SimpleUrl $url         Host and path to write under.