Zend_Http_Cookie is a class describing an HTTP cookie and all it's parameters.
Zend_Http_Cookie is a class describing an HTTP cookie and all it's parameters. The class also enables validating whether the cookie should be sent to the server in a specified scenario according to the request URI, the expiry time and whether session cookies should be used or not. Generally speaking cookies should be contained in a Cookiejar object, or instantiated manually and added to an HTTP request.
See http://wp.netscape.com/newsref/std/cookie_spec.html for some specs.
category | Zend |
---|---|
package | Zend_Http |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
__construct(string $name, string $value, string $domain, integer $expires= null
, string $path= null
, boolean $secure= false
)
todo | Add validation of each one of the parameters (legal domain, etc.) |
---|
string
string
string
integer
string
boolean
__toString() : string
string
fromString(string $cookieStr, \Zend_Uri_Http|string $refUri= null
, boolean $encodeValue= true
) : \Zend_Http_Cookie
string
\Zend_Uri_Http
string
Reference URI for default values (domain, path)
boolean
Whether or not the cookie's value should be passed through urlencode/urldecode
\Zend_Http_Cookie
A new Zend_Http_Cookie object or false on failure.getDomain() : string
string
getExpiryTime() : integer | null
integer
null
getName() : string
string
getPath() : string
string
getValue() : string
string
isExpired(integer $now = null
) : boolean
Always returns false if the cookie is a session cookie (has no expiry time)
integer
Timestamp to consider as "now"
boolean
isSecure() : boolean
boolean
isSessionCookie() : boolean
boolean
match(string|\Zend_Uri_Http $uri, boolean $matchSessionCookies= true
, integer $now= null
) : boolean
string
\Zend_Uri_Http
URI to check against (secure, domain, path)
boolean
Whether to send session cookies
integer
Override the current time when checking for expiry time
boolean
matchCookieDomain(string $cookieDomain, string $host) : boolean
Used by Zend_Http_Cookie and Zend_Http_CookieJar for cookie matching
string
string
boolean
matchCookiePath(string $cookiePath, string $path) : boolean
Used by Zend_Http_Cookie and Zend_Http_CookieJar for cookie matching
string
string
boolean
$domain : string
$encodeValue : boolean
$expires : integer
$name : string
$path : string
$secure : boolean
$value : string