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