Fully Qualified Name: | Zend\Http\Header\SetCookie |
Implements: | MultipleHeaderInterface |
Cookie object constructor
Parameter Name | Type | Description |
---|---|---|
$name | string | |
$value | string | |
$expires | int|string|\DateTime | |
$path | string | |
$domain | string | |
$secure | bool | |
$httponly | bool | |
$maxAge | string | |
$version | int |
Returns:
Parameter Name | Type | Description |
---|---|---|
$headerLine | ||
$bypassHeaderFieldName | bool | |
$headerLine |
Returns: array|\SetCookie
Returns: string
Returns: bool
Parameter Name | Type | Description |
---|---|---|
$inSeconds | bool |
Returns: int|string
Returns: string 'Set-Cookie'
Returns: string
Get Max-Age
Returns: int
Returns: string
Returns: string
Returns: string
Get version
Returns: int
Check whether the value for this cookie should be quoted
Returns: bool
Check whether the cookie has expired
Always returns false if the cookie is a session cookie (has no expiry time)
Parameter Name | Type | Description |
---|---|---|
$now | int | Timestamp |
Returns: bool
Returns: bool
Returns: bool
Check whether the cookie is a session cookie (has no expiry time set)
Returns: bool
Parameter Name | Type | Description |
---|---|---|
$requestDomain | ||
$path | ||
$isSecure |
Returns: void
Checks whether the cookie should be sent or not in a specific scenario
Parameter Name | Type | Description |
---|---|---|
$uri | string|\Zend\Uri\Uri | URI |
$matchSessionCookies | bool | Whether |
$now | int | Override |
Returns: bool
Check if a cookie's domain matches a host name.
Used by Zend\Http\Cookies for cookie matching
Parameter Name | Type | Description |
---|---|---|
$cookieDomain | string | |
$host | string |
Returns: bool
Check if a cookie's path matches a URL path
Used by Zend\Http\Cookies for cookie matching
Parameter Name | Type | Description |
---|---|---|
$cookiePath | string | |
$path | string |
Returns: bool
Parameter Name | Type | Description |
---|---|---|
$domain | string |
Returns: \SetCookie
Parameter Name | Type | Description |
---|---|---|
$encodeValue | bool |
Returns:
Set Expires
Parameter Name | Type | Description |
---|---|---|
$expires | int|string|\DateTime |
Returns: self
Parameter Name | Type | Description |
---|---|---|
$httponly | bool |
Returns: \SetCookie
Set Max-Age
Parameter Name | Type | Description |
---|---|---|
$maxAge | int |
Returns: \SetCookie
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns: \SetCookie
Parameter Name | Type | Description |
---|---|---|
$path | string |
Returns: \SetCookie
Set whether the value for this cookie should be quoted
Parameter Name | Type | Description |
---|---|---|
$quotedValue | bool |
Returns: \SetCookie
Parameter Name | Type | Description |
---|---|---|
$secure | bool |
Returns: \SetCookie
Parameter Name | Type | Description |
---|---|---|
$value | string |
Returns: \SetCookie
Set version
Parameter Name | Type | Description |
---|---|---|
$version | int |
Returns: \SetCookie
Returns: void
Parameter Name | Type | Description |
---|---|---|
$headers |
Returns: void