class Cookie
Cookie represents an HTTP cookie.
Methods
|
__construct(string $name, string $value, string $expires = null, string $path = null, string $domain = '', Boolean $secure = false, Boolean $httponly = true, Boolean $encodedValue = false)
Sets a cookie. |
||
| string |
__toString()
Returns the HTTP representation of the Cookie. |
|
| static Cookie |
fromString(string $cookie, string $url = null)
Creates a Cookie instance from a Set-Cookie header value. |
|
| string |
getName()
Gets the name of the cookie. |
|
| string |
getValue()
Gets the value of the cookie. |
|
| string |
getRawValue()
Gets the raw value of the cookie. |
|
| string |
getExpiresTime()
Gets the expires time of the cookie. |
|
| string |
getPath()
Gets the path of the cookie. |
|
| string |
getDomain()
Gets the domain of the cookie. |
|
| Boolean |
isSecure()
Returns the secure flag of the cookie. |
|
| Boolean |
isHttpOnly()
Returns the httponly flag of the cookie. |
|
| Boolean |
isExpired()
Returns true if the cookie has expired. |
Details
at line 62
public
__construct(string $name, string $value, string $expires = null, string $path = null, string $domain = '', Boolean $secure = false, Boolean $httponly = true, Boolean $encodedValue = false)
Sets a cookie.
at line 86
public string
__toString()
Returns the HTTP representation of the Cookie.
at line 125
static public Cookie
fromString(string $cookie, string $url = null)
Creates a Cookie instance from a Set-Cookie header value.
at line 224
public string
getName()
Gets the name of the cookie.
at line 236
public string
getValue()
Gets the value of the cookie.
at line 248
public string
getRawValue()
Gets the raw value of the cookie.
at line 260
public string
getExpiresTime()
Gets the expires time of the cookie.
at line 272
public string
getPath()
Gets the path of the cookie.
at line 284
public string
getDomain()
Gets the domain of the cookie.
at line 296
public Boolean
isSecure()
Returns the secure flag of the cookie.
at line 308
public Boolean
isHttpOnly()
Returns the httponly flag of the cookie.
at line 320
public Boolean
isExpired()
Returns true if the cookie has expired.