|
Open Journal Systems
3.3.0
|
Public Member Functions | |
| __construct ($strictMode=false) | |
| add (Cookie $cookie) | |
| addCookiesFromResponse (Response $response, RequestInterface $request=null) | |
| all ($domain=null, $path=null, $name=null, $skipDiscardable=false, $skipExpired=true) | |
| count () | |
| getIterator () | |
| getMatchingCookies (RequestInterface $request) | |
| remove ($domain=null, $path=null, $name=null) | |
| removeExpired () | |
| removeTemporary () | |
| serialize () | |
| setStrictMode ($strictMode) | |
| unserialize ($data) | |
Protected Attributes | |
| $cookies = array() | |
| $strictMode | |
Cookie cookieJar that stores cookies an an array
Definition at line 14 of file ArrayCookieJar.php.
| Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar::__construct | ( | $strictMode = false | ) |
| bool | $strictMode | Set to true to throw exceptions when invalid cookies are added to the cookie jar |
Reimplemented in Guzzle\Plugin\Cookie\CookieJar\FileCookieJar.
Definition at line 31 of file ArrayCookieJar.php.
References Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\$strictMode.
| Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar::add | ( | Cookie | $cookie | ) |
Add a cookie to the cookie cookieJar
Implements Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface.
Definition at line 94 of file ArrayCookieJar.php.
References Guzzle\Plugin\Cookie\Cookie\getDiscard(), Guzzle\Plugin\Cookie\Cookie\getDomain(), Guzzle\Plugin\Cookie\Cookie\getExpires(), Guzzle\Plugin\Cookie\Cookie\getName(), Guzzle\Plugin\Cookie\Cookie\getPath(), Guzzle\Plugin\Cookie\Cookie\getPorts(), Guzzle\Plugin\Cookie\Cookie\getValue(), and Guzzle\Plugin\Cookie\Cookie\validate().
Referenced by Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\addCookiesFromResponse().
| Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar::addCookiesFromResponse | ( | Response | $response, |
| RequestInterface | $request = null |
||
| ) |
Add cookies from a {
| Response | $response | Response object |
| RequestInterface | $request | Request that received the response |
Implements Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface.
Definition at line 194 of file ArrayCookieJar.php.
References Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\add(), and Guzzle\Parser\ParserRegistry\getInstance().
| Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar::all | ( | $domain = null, |
|
$path = null, |
|||
$name = null, |
|||
$skipDiscardable = false, |
|||
$skipExpired = true |
|||
| ) |
Get all of the matching cookies
| string | $domain | Domain of the cookie |
| string | $path | Path of the cookie |
| string | $name | Name of the cookie |
| bool | $skipDiscardable | Set to TRUE to skip cookies with the Discard attribute. |
| bool | $skipExpired | Set to FALSE to include expired |
Implements Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface.
Definition at line 77 of file ArrayCookieJar.php.
References Guzzle\Plugin\Cookie\Cookie\getDiscard(), Guzzle\Plugin\Cookie\Cookie\getExpires(), Guzzle\Plugin\Cookie\Cookie\getName(), Guzzle\Plugin\Cookie\Cookie\isExpired(), Guzzle\Plugin\Cookie\Cookie\matchesDomain(), and Guzzle\Plugin\Cookie\Cookie\matchesPath().
Referenced by Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\getMatchingCookies(), Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\remove(), and Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\serialize().
| Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar::count | ( | ) |
Returns the total number of stored cookies
Definition at line 179 of file ArrayCookieJar.php.
| Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar::getIterator | ( | ) |
| Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar::getMatchingCookies | ( | RequestInterface | $request | ) |
Get cookies matching a request object
| RequestInterface | $request | Request object to match |
Implements Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface.
Definition at line 216 of file ArrayCookieJar.php.
References Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\$cookies, Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\all(), Guzzle\Http\Message\RequestInterface\getHost(), Guzzle\Http\Message\RequestInterface\getPath(), Guzzle\Http\Message\RequestInterface\getPort(), and Guzzle\Http\Message\RequestInterface\getScheme().
| Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar::remove | ( | $domain = null, |
|
$path = null, |
|||
$name = null |
|||
| ) |
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.
| string | $domain | Set to clear only cookies matching a domain |
| string | $path | Set to clear only cookies matching a domain and path |
| string | $name | Set to clear only cookies matching a domain, path, and name |
Implements Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface.
Definition at line 48 of file ArrayCookieJar.php.
References Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\$cookies, and Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\all().
| Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar::removeExpired | ( | ) |
Delete any expired cookies
Implements Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface.
Definition at line 67 of file ArrayCookieJar.php.
References Guzzle\Plugin\Cookie\Cookie\getExpires().
| Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar::removeTemporary | ( | ) |
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.
Implements Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface.
Definition at line 58 of file ArrayCookieJar.php.
References Guzzle\Plugin\Cookie\Cookie\getDiscard(), and Guzzle\Plugin\Cookie\Cookie\getExpires().
| Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar::serialize | ( | ) |
Serializes the cookie cookieJar
Definition at line 151 of file ArrayCookieJar.php.
References Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\all(), and Guzzle\Plugin\Cookie\Cookie\toArray().
Referenced by Guzzle\Plugin\Cookie\CookieJar\FileCookieJar\persist().
| Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar::setStrictMode | ( | $strictMode | ) |
Enable or disable strict mode on the cookie jar
| bool | $strictMode | Set to true to throw exceptions when invalid cookies are added. False to ignore them. |
Definition at line 43 of file ArrayCookieJar.php.
References Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\$strictMode.
| Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar::unserialize | ( | $data | ) |
Unserializes the cookie cookieJar
Definition at line 162 of file ArrayCookieJar.php.
Referenced by Guzzle\Plugin\Cookie\CookieJar\FileCookieJar\load().
|
protected |
Loaded cookie data
Definition at line 20 of file ArrayCookieJar.php.
Referenced by Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\getMatchingCookies(), and Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\remove().
|
protected |
Whether or not strict mode is enabled. When enabled, exceptions will be thrown for invalid cookies
Definition at line 26 of file ArrayCookieJar.php.
Referenced by Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\__construct(), and Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\setStrictMode().