ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
This class provides access to service cookies and handles parsing of response headers to pull out cookie values. More...
Public Member Functions | |
__construct (array &$storageArray) | |
Create a new cookie jar by passing it a reference to an array in which it should store cookies. More... | |
storeCookies ($request_url, $response_headers) | |
Store cookies for a web service request. More... | |
getCookies ($request_url) | |
Retrieve cookies applicable for a web service request. More... | |
Protected Member Functions | |
parseCookieHeaders ( $header, $defaultDomain) | |
Parse Cookies without PECL From the comments in http://php.net/manual/en/function.http-parse-cookie.php. More... | |
parseCookieHeader ($line, $defaultDomain) | |
Parse a single cookie header line. More... | |
storeCookie ($cookie) | |
Add, update, or remove a cookie. More... | |
discardCookie ($cookie) | |
Discard an existing cookie. More... | |
expireCookies () | |
Go through our stored cookies and remove any that are expired. More... | |
cookieMatchesTarget ($cookie, $target) | |
Answer true if cookie is applicable to a target. More... | |
Private Attributes | |
$_cookies | |
This class provides access to service cookies and handles parsing of response headers to pull out cookie values.
Definition at line 41 of file CookieJar.php.
CAS_CookieJar::__construct | ( | array & | $storageArray | ) |
Create a new cookie jar by passing it a reference to an array in which it should store cookies.
array | &$storageArray | Array to store cookies |
Definition at line 54 of file CookieJar.php.
|
protected |
Answer true if cookie is applicable to a target.
array | $cookie | An array of cookie attributes. |
array | $target | An array of URL attributes as generated by parse_url(). |
private
Definition at line 317 of file CookieJar.php.
References $target.
Referenced by getCookies(), and storeCookies().
|
protected |
Discard an existing cookie.
array | $cookie | An cookie |
protected
Definition at line 272 of file CookieJar.php.
Referenced by storeCookie().
|
protected |
Go through our stored cookies and remove any that are expired.
protected
Definition at line 298 of file CookieJar.php.
References time.
Referenced by getCookies().
CAS_CookieJar::getCookies | ( | $request_url | ) |
Retrieve cookies applicable for a web service request.
Cookie applicability is based on RFC 2965: http://www.ietf.org/rfc/rfc2965.txt
string | $request_url | The url that the cookies will be for. |
private
Definition at line 102 of file CookieJar.php.
References $target, array, cookieMatchesTarget(), and expireCookies().
|
protected |
Parse a single cookie header line.
Based on RFC2965 http://www.ietf.org/rfc/rfc2965.txt
string | $line | The header line. |
string | $defaultDomain | The domain to use if none is specified in the cookie. |
Definition at line 161 of file CookieJar.php.
References array, time, and phpCAS\trace().
Referenced by parseCookieHeaders().
|
protected |
Parse Cookies without PECL From the comments in http://php.net/manual/en/function.http-parse-cookie.php.
array | $header | array of header lines. |
string | $defaultDomain | The domain to use if none is specified in the cookie. |
Definition at line 136 of file CookieJar.php.
References $header, array, parseCookieHeader(), phpCAS\traceBegin(), and phpCAS\traceEnd().
Referenced by storeCookies().
|
protected |
Add, update, or remove a cookie.
array | $cookie | A cookie array as created by parseCookieHeaders() |
protected
Definition at line 255 of file CookieJar.php.
References discardCookie().
Referenced by storeCookies().
CAS_CookieJar::storeCookies | ( | $request_url, | |
$response_headers | |||
) |
Store cookies for a web service request.
Cookie storage is based on RFC 2965: http://www.ietf.org/rfc/rfc2965.txt
string | $request_url | The URL that generated the response headers. |
array | $response_headers | An array of the HTTP response header strings. |
private
Definition at line 70 of file CookieJar.php.
References cookieMatchesTarget(), parseCookieHeaders(), storeCookie(), and phpCAS\trace().
|
private |
Definition at line 44 of file CookieJar.php.