Zend Framework
1.12
|
Public Member Functions | |
__construct ($name, $value, $domain, $expires=null, $path=null, $secure=false) | |
Cookie object constructor. | |
getName () | |
Get Cookie name. | |
getValue () | |
Get cookie value. | |
getDomain () | |
Get cookie domain. | |
getPath () | |
Get the cookie path. | |
getExpiryTime () | |
Get the expiry time of the cookie, or null if no expiry time is set. | |
isSecure () | |
Check whether the cookie should only be sent over secure connections. | |
isExpired ($now=null) | |
Check whether the cookie has expired. | |
isSessionCookie () | |
Check whether the cookie is a session cookie (has no expiry time set) | |
match ($uri, $matchSessionCookies=true, $now=null) | |
Checks whether the cookie should be sent or not in a specific scenario. | |
__toString () | |
Get the cookie as a string, suitable for sending as a "Cookie" header in an HTTP request. | |
Static Public Member Functions | |
static | fromString ($cookieStr, $refUri=null, $encodeValue=true) |
Generate a new Cookie object from a cookie string (for example the value of the Set-Cookie HTTP header) | |
static | matchCookieDomain ($cookieDomain, $host) |
Check if a cookie's domain matches a host name. | |
static | matchCookiePath ($cookiePath, $path) |
Check if a cookie's path matches a URL path. | |
Protected Attributes | |
$name | |
$value | |
$expires | |
$domain | |
$path | |
$secure | |
$encodeValue | |
__construct | ( | $name, | |
$value, | |||
$domain, | |||
$expires = null , |
|||
$path = null , |
|||
$secure = false |
|||
) |
Cookie object constructor.
string | $name | |
string | $value | |
string | $domain | |
int | $expires | |
string | $path | |
bool | $secure |
__toString | ( | ) |
Get the cookie as a string, suitable for sending as a "Cookie" header in an HTTP request.
|
static |
Generate a new Cookie object from a cookie string (for example the value of the Set-Cookie HTTP header)
string | $cookieStr | |
Zend_Uri_Http | string | $refUri | Reference URI for default values (domain, path) |
boolean | $encodeValue | Whether or not the cookie's value should be passed through urlencode/urldecode |
The expiration is past Tue, 19 Jan 2038 03:14:07 UTC the maximum for 32-bit signed integer. Zend_Date can get around that limit.
getDomain | ( | ) |
Get cookie domain.
getExpiryTime | ( | ) |
Get the expiry time of the cookie, or null if no expiry time is set.
getName | ( | ) |
Get Cookie name.
getPath | ( | ) |
Get the cookie path.
getValue | ( | ) |
Get cookie value.
isExpired | ( | $now = null | ) |
Check whether the cookie has expired.
Always returns false if the cookie is a session cookie (has no expiry time)
int | $now | Timestamp to consider as "now" |
isSecure | ( | ) |
Check whether the cookie should only be sent over secure connections.
isSessionCookie | ( | ) |
Check whether the cookie is a session cookie (has no expiry time set)
match | ( | $uri, | |
$matchSessionCookies = true , |
|||
$now = null |
|||
) |
Checks whether the cookie should be sent or not in a specific scenario.
string | Zend_Uri_Http | $uri | URI to check against (secure, domain, path) |
boolean | $matchSessionCookies | Whether to send session cookies |
int | $now | Override the current time when checking for expiry time |
|
static |
Check if a cookie's domain matches a host name.
Used by Zend_Http_Cookie and Zend_Http_CookieJar for cookie matching
string | $cookieDomain | |
string | $host |
|
static |
Check if a cookie's path matches a URL path.
Used by Zend_Http_Cookie and Zend_Http_CookieJar for cookie matching
string | $cookiePath | |
string | $path |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |