Cookie
class Cookie
Cookie represents an HTTP cookie.
Methods
Sets a cookie.
Returns the HTTP representation of the Cookie.
Creates a Cookie instance from a Set-Cookie header value.
Gets the name of the cookie.
Gets the value of the cookie.
Gets the raw value of the cookie.
Gets the expires time of the cookie.
Gets the path of the cookie.
Gets the domain of the cookie.
Returns the secure flag of the cookie.
Returns the httponly flag of the cookie.
Returns true if the cookie has expired.
Details
at line line 58
__construct(string $name, string $value, string $expires = null, string $path = null, string $domain = '', bool $secure = false, bool $httponly = true, bool $encodedValue = false)
Sets a cookie.
at line line 90
string
__toString()
Returns the HTTP representation of the Cookie.
at line line 128
static Cookie
fromString(string $cookie, string $url = null)
Creates a Cookie instance from a Set-Cookie header value.
at line line 225
string
getName()
Gets the name of the cookie.
at line line 235
string
getValue()
Gets the value of the cookie.
at line line 245
string
getRawValue()
Gets the raw value of the cookie.
at line line 255
string
getExpiresTime()
Gets the expires time of the cookie.
at line line 265
string
getPath()
Gets the path of the cookie.
at line line 275
string
getDomain()
Gets the domain of the cookie.
at line line 285
bool
isSecure()
Returns the secure flag of the cookie.
at line line 295
bool
isHttpOnly()
Returns the httponly flag of the cookie.
at line line 305
bool
isExpired()
Returns true if the cookie has expired.