Interface Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface

ExtendsCountable, IteratorAggregate
Implemented byGuzzle\Plugin\Cookie\CookieJar\ArrayCookieJar, Guzzle\Plugin\Cookie\CookieJar\FileCookieJar

Interface for persisting cookies

Public Methods

Hide inherited methods

MethodDescriptionDefined By
add() Add a cookie to the cookie cookieJar Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface
addCookiesFromResponse() Add cookies from a {@see Guzzle\Http\Message\Response} object Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface
all() Get all of the matching cookies Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface
getMatchingCookies() Get cookies matching a request object Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface
remove() Remove cookies currently held in the Cookie cookieJar. Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface
removeExpired() Delete any expired cookies Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface
removeTemporary() Discard all temporary cookies. Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface

Method Details

add() public abstract method

Add a cookie to the cookie cookieJar

public abstract bool add ( Guzzle\Plugin\Cookie\Cookie $cookie )
$cookie Guzzle\Plugin\Cookie\Cookie

Cookie to add

return bool

Returns true on success or false on failure

addCookiesFromResponse() public abstract method

Add cookies from a {@see Guzzle\Http\Message\Response} object

public abstract void addCookiesFromResponse ( Guzzle\Http\Message\Response $response, Guzzle\Http\Message\RequestInterface $request null )
$response Guzzle\Http\Message\Response

Response object

$request Guzzle\Http\Message\RequestInterface

Request that received the response

all() public abstract method

Get all of the matching cookies

public abstract array all ( $domain null, $path null, $name null, $skipDiscardable false, $skipExpired true )
$domain string

Domain of the cookie

$path string

Path of the cookie

$name string

Name of the cookie

$skipDiscardable bool

Set to TRUE to skip cookies with the Discard attribute.

$skipExpired bool

Set to FALSE to include expired

return array

Returns an array of Cookie objects

getMatchingCookies() public abstract method

Get cookies matching a request object

public abstract array getMatchingCookies ( Guzzle\Http\Message\RequestInterface $request )
$request Guzzle\Http\Message\RequestInterface

Request object to match

remove() public abstract method

Remove cookies currently held in the Cookie cookieJar.

Invoking this method without arguments will empty the whole Cookie cookieJar. If given a $domain argument only cookies belonging to that domain will be removed. If given a $domain and $path argument, cookies belonging to the specified path within that domain are removed. If given all three arguments, then the cookie with the specified name, path and domain is removed.

public abstract Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface remove ( $domain null, $path null, $name null )
$domain string

Set to clear only cookies matching a domain

$path string

Set to clear only cookies matching a domain and path

$name string

Set to clear only cookies matching a domain, path, and name

removeExpired() public abstract method

Delete any expired cookies

public abstract Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface removeExpired ( )
removeTemporary() public abstract method

Discard all temporary cookies.

Scans for all cookies in the cookieJar with either no expire field or a true discard flag. To be called when the user agent shuts down according to RFC 2965.

public abstract Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface removeTemporary ( )