CookieException
extends FrameworkException
in package
CookieException is thrown for invalid cookies initialization and management.
Table of Contents
- __construct() : mixed
- Tweaks the exception's constructor to assign the file/line to where it is actually raised rather than were it is instantiated.
- forCopyError() : mixed
- forEmptyCookieName() : static
- Thrown when the cookie name is empty.
- forEnabledZlibOutputCompression() : mixed
- forFabricatorCreateFailed() : mixed
- forInvalidCookieInstance() : static
- Thrown when the `CookieStore` class is filled with invalid Cookie objects.
- forInvalidCookieName() : static
- Thrown when the cookie name contains invalid characters per RFC 2616.
- forInvalidExpiresTime() : static
- Thrown for invalid type given for the "Expires" attribute.
- forInvalidExpiresValue() : static
- Thrown when the value provided for "Expires" is invalid.
- forInvalidFile() : mixed
- forInvalidHostPrefix() : static
- Thrown when using the `__Host-` prefix but the `Secure` flag is not set, the `Domain` is set, and the `Path` is not `/`.
- forInvalidSameSite() : static
- Thrown when the `SameSite` attribute given is not of the valid types.
- forInvalidSameSiteNone() : static
- Thrown when the `SameSite` attribute is set to `None` but the `Secure` attribute is not set.
- forInvalidSecurePrefix() : static
- Thrown when using the `__Secure-` prefix but the `Secure` attribute is not set to true.
- forMissingExtension() : mixed
- forNoHandlers() : mixed
- forUnknownCookieInstance() : static
- Thrown when the queried Cookie object does not exist in the cookie collection.
Methods
__construct()
Tweaks the exception's constructor to assign the file/line to where it is actually raised rather than were it is instantiated.
public
final __construct([string $message = '' ], int $code[, Throwable|null $previous = null ]) : mixed
Parameters
- $message : string = ''
- $code : int
- $previous : Throwable|null = null
Return values
mixed —forCopyError()
public
static forCopyError(string $path) : mixed
Parameters
- $path : string
Return values
mixed —forEmptyCookieName()
Thrown when the cookie name is empty.
public
static forEmptyCookieName() : static
Return values
static —forEnabledZlibOutputCompression()
public
static forEnabledZlibOutputCompression() : mixed
Return values
mixed —forFabricatorCreateFailed()
public
static forFabricatorCreateFailed(string $table, string $reason) : mixed
Parameters
- $table : string
- $reason : string
Return values
mixed —forInvalidCookieInstance()
Thrown when the `CookieStore` class is filled with invalid Cookie objects.
public
static forInvalidCookieInstance(array<string|int, string|int> $data) : static
Parameters
- $data : array<string|int, string|int>
Return values
static —forInvalidCookieName()
Thrown when the cookie name contains invalid characters per RFC 2616.
public
static forInvalidCookieName(string $name) : static
Parameters
- $name : string
Return values
static —forInvalidExpiresTime()
Thrown for invalid type given for the "Expires" attribute.
public
static forInvalidExpiresTime(string $type) : static
Parameters
- $type : string
Return values
static —forInvalidExpiresValue()
Thrown when the value provided for "Expires" is invalid.
public
static forInvalidExpiresValue() : static
Return values
static —forInvalidFile()
public
static forInvalidFile(string $path) : mixed
Parameters
- $path : string
Return values
mixed —forInvalidHostPrefix()
Thrown when using the `__Host-` prefix but the `Secure` flag is not set, the `Domain` is set, and the `Path` is not `/`.
public
static forInvalidHostPrefix() : static
Return values
static —forInvalidSameSite()
Thrown when the `SameSite` attribute given is not of the valid types.
public
static forInvalidSameSite(string $sameSite) : static
Parameters
- $sameSite : string
Return values
static —forInvalidSameSiteNone()
Thrown when the `SameSite` attribute is set to `None` but the `Secure` attribute is not set.
public
static forInvalidSameSiteNone() : static
Return values
static —forInvalidSecurePrefix()
Thrown when using the `__Secure-` prefix but the `Secure` attribute is not set to true.
public
static forInvalidSecurePrefix() : static
Return values
static —forMissingExtension()
public
static forMissingExtension(string $extension) : mixed
Parameters
- $extension : string
Return values
mixed —forNoHandlers()
public
static forNoHandlers(string $class) : mixed
Parameters
- $class : string
Return values
mixed —forUnknownCookieInstance()
Thrown when the queried Cookie object does not exist in the cookie collection.
public
static forUnknownCookieInstance(array<string|int, string> $data) : static
Parameters
- $data : array<string|int, string>