[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
Cookie storage object
File Size: | 505 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
Requests_Cookie:: (15 methods):
__construct()
is_expired()
uri_matches()
domain_matches()
path_matches()
normalize()
normalize_attribute()
format_for_header()
formatForHeader()
format_for_set_cookie()
formatForSetCookie()
__toString()
parse()
parse_from_headers()
parseFromHeaders()
Class: Requests_Cookie - X-Ref
Cookie storage object__construct($name, $value, $attributes = array() X-Ref |
Create a new cookie object param: string $name param: string $value param: array|Requests_Utility_CaseInsensitiveDictionary $attributes Associative array of attribute data |
is_expired() X-Ref |
Check if a cookie is expired. Checks the age against $this->reference_time to determine if the cookie is expired. return: boolean True if expired, false if time is valid. |
uri_matches(Requests_IRI $uri) X-Ref |
Check if a cookie is valid for a given URI return: boolean Whether the cookie is valid for the given URI param: Requests_IRI $uri URI to check |
domain_matches($string) X-Ref |
Check if a cookie is valid for a given domain return: boolean Whether the cookie is valid for the given domain param: string $string Domain to check |
path_matches($request_path) X-Ref |
Check if a cookie is valid for a given path From the path-match check in RFC 6265 section 5.1.4 return: boolean Whether the cookie is valid for the given path param: string $request_path Path to check |
normalize() X-Ref |
Normalize cookie and attributes return: boolean Whether the cookie was successfully normalized |
normalize_attribute($name, $value) X-Ref |
Parse an individual cookie attribute Handles parsing individual attributes from the cookie values. return: mixed Value if available, or null if the attribute value is invalid (and should be skipped) param: string $name Attribute name param: string|boolean $value Attribute value (string value, or true if empty/flag) |
format_for_header() X-Ref |
Format a cookie for a Cookie header This is used when sending cookies to a server. return: string Cookie formatted for Cookie header |
formatForHeader() X-Ref |
Format a cookie for a Cookie header return: string |
format_for_set_cookie() X-Ref |
Format a cookie for a Set-Cookie header This is used when sending cookies to clients. This isn't really applicable to client-side usage, but might be handy for debugging. return: string Cookie formatted for Set-Cookie header |
formatForSetCookie() X-Ref |
Format a cookie for a Set-Cookie header return: string |
__toString() X-Ref |
Get the cookie value Attributes and other data can be accessed via methods. |
parse($string, $name = '', $reference_time = null) X-Ref |
Parse a cookie string into a cookie object Based on Mozilla's parsing code in Firefox and related projects, which is an intentional deviation from RFC 2109 and RFC 2616. RFC 6265 specifies some of this handling, but not in a thorough manner. return: Requests_Cookie Parsed cookie object param: string Cookie header value (from a Set-Cookie header) |
parse_from_headers(Requests_Response_Headers $headers, Requests_IRI $origin = null, $time = null) X-Ref |
Parse all Set-Cookie headers from request headers return: array param: Requests_Response_Headers $headers Headers to parse from param: Requests_IRI|null $origin URI for comparing cookie origins param: int|null $time Reference time for expiration calculation |
parseFromHeaders(Requests_Response_Headers $headers) X-Ref |
Parse all Set-Cookie headers from request headers return: array |
Generated: Thu Dec 15 01:00:02 2022 | Cross-referenced by PHPXref 0.7.1 |