|
ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
This class provides access to service cookies and handles parsing of response headers to pull out cookie values. More...
Collaboration diagram for CAS_CookieJar: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 53 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(). |
@access private
Definition at line 315 of file CookieJar.php.
References $target.
Referenced by getCookies(), and storeCookies().
Here is the caller graph for this function:
|
protected |
Discard an existing cookie.
| array | $cookie | An cookie |
@access protected
Definition at line 270 of file CookieJar.php.
References $key.
Referenced by storeCookie().
Here is the caller graph for this function:
|
protected |
Go through our stored cookies and remove any that are expired.
@access protected
Definition at line 296 of file CookieJar.php.
References $key.
Referenced by getCookies().
Here is the caller graph for this function:| 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. |
@access private
Definition at line 101 of file CookieJar.php.
References $key, $target, cookieMatchesTarget(), and expireCookies().
Here is the call graph for this function:
|
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 160 of file CookieJar.php.
References phpCAS\trace().
Referenced by parseCookieHeaders().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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 135 of file CookieJar.php.
References $header, parseCookieHeader(), phpCAS\traceBegin(), and phpCAS\traceEnd().
Referenced by storeCookies().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Add, update, or remove a cookie.
| array | $cookie | A cookie array as created by parseCookieHeaders() |
@access protected
Definition at line 254 of file CookieJar.php.
References discardCookie().
Referenced by storeCookies().
Here is the call graph for this function:
Here is the caller graph for this function:| 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. |
@access private
Definition at line 69 of file CookieJar.php.
References cookieMatchesTarget(), parseCookieHeaders(), storeCookie(), and phpCAS\trace().
Here is the call graph for this function:
|
private |
Definition at line 43 of file CookieJar.php.