SetCookieCollection
- Full name:
\Qubus\Http\Cookies\SetCookieCollection
- This class is marked as final and can't be subclassed
- This class is a Final class
Properties
name
value
expires
maxAge
path
domain
secure
httpOnly
sameSite
Methods
__construct
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | |
$value | ?string |
getName
Retrieve name.
getValue
Retrieve value.
getExpires
Retrieve expiry.
getMaxAge
Retrieve max age.
getPath
Retrieve path.
getDomain
Retrieve domain.
getSecure
Is SetCookieCollection set to secure?
getHttpOnly
Check if set to http only.
getSameSite
Retrieve samesite.
withValue
Return an instance with the provided value.
Parameters:
Parameter | Type | Description |
---|---|---|
$value | ?string |
resolveExpires
Parameters:
Parameter | Type | Description |
---|---|---|
$expires | \DateTimeInterface|int|string|null |
Throws:
withExpires
Return an instance with the provided expiry.
public withExpires(\DateTimeInterface|int|string|null $expires = null): \Qubus\Http\Cookies\SetCookieCollection
Parameters:
Parameter | Type | Description |
---|---|---|
$expires | \DateTimeInterface|int|string|null |
Throws:
rememberForever
Throws:
expire
Throws:
withMaxAge
Return an instance with the provided max age.
Parameters:
Parameter | Type | Description |
---|---|---|
$maxAge | ?int |
withPath
Return an instance with the provided path.
Parameters:
Parameter | Type | Description |
---|---|---|
$path | ?string |
withDomain
Return an instance with the provided domain.
Parameters:
Parameter | Type | Description |
---|---|---|
$domain | ?string |
withSecure
Return an instance with/without
Parameters:
Parameter | Type | Description |
---|---|---|
$secure | bool |
withHttpOnly
Parameters:
Parameter | Type | Description |
---|---|---|
$httpOnly | bool |
withSameSite
Parameters:
Parameter | Type | Description |
---|---|---|
$sameSite | \Qubus\Http\Cookies\SameSite |
withoutSameSite
__toString
create
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | |
$value | ?string |
createRememberedForever
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | |
$value | ?string |
Throws:
createExpired
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string |
Throws:
fromSetCookieString
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$string | string |
Throws:
appendFormattedDomainPartIfSet
Parameters:
Parameter | Type | Description |
---|---|---|
$cookieStringParts | string[] |
appendFormattedPathPartIfSet
Parameters:
Parameter | Type | Description |
---|---|---|
$cookieStringParts | string[] |
appendFormattedExpiresPartIfSet
Parameters:
Parameter | Type | Description |
---|---|---|
$cookieStringParts | string[] |
appendFormattedMaxAgePartIfSet
Parameters:
Parameter | Type | Description |
---|---|---|
$cookieStringParts | string[] |
appendFormattedSecurePartIfSet
Parameters:
Parameter | Type | Description |
---|---|---|
$cookieStringParts | string[] |
appendFormattedHttpOnlyPartIfSet
Parameters:
Parameter | Type | Description |
---|---|---|
$cookieStringParts | string[] |
appendFormattedSameSitePartIfSet
Parameters:
Parameter | Type | Description |
---|---|---|
$cookieStringParts | string[] |
Automatically generated on 2025-10-13