CookieException
extends FrameworkException
in package
CookieException is thrown for invalid cookies initialization and management.
Table of Contents
Methods
- __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() : static
- forEmptyCookieName() : static
- Thrown when the cookie name is empty.
- forEnabledZlibOutputCompression() : static
- forFabricatorCreateFailed() : static
- 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.
- forInvalidDirectory() : static
- forInvalidExpiresTime() : static
- Thrown for invalid type given for the "Expires" attribute.
- forInvalidExpiresValue() : static
- Thrown when the value provided for "Expires" is invalid.
- forInvalidFile() : static
- 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() : static
- forNoHandlers() : static
- 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 = 0 ][, Throwable|null $previous = null ]) : mixed
Parameters
- $message : string = ''
- $code : int = 0
- $previous : Throwable|null = null
forCopyError()
public
static forCopyError(string $path) : static
Parameters
- $path : string
Return values
staticforEmptyCookieName()
Thrown when the cookie name is empty.
public
static forEmptyCookieName() : static
Return values
staticforEnabledZlibOutputCompression()
public
static forEnabledZlibOutputCompression() : static
Return values
staticforFabricatorCreateFailed()
public
static forFabricatorCreateFailed(string $table, string $reason) : static
Parameters
- $table : string
- $reason : string
Return values
staticforInvalidCookieInstance()
Thrown when the `CookieStore` class is filled with invalid Cookie objects.
public
static forInvalidCookieInstance(array<int, int|string> $data) : static
Parameters
- $data : array<int, int|string>
Return values
staticforInvalidCookieName()
Thrown when the cookie name contains invalid characters per RFC 2616.
public
static forInvalidCookieName(string $name) : static
Parameters
- $name : string
Return values
staticforInvalidDirectory()
public
static forInvalidDirectory(string $path) : static
Parameters
- $path : string
Return values
staticforInvalidExpiresTime()
Thrown for invalid type given for the "Expires" attribute.
public
static forInvalidExpiresTime(string $type) : static
Parameters
- $type : string
Return values
staticforInvalidExpiresValue()
Thrown when the value provided for "Expires" is invalid.
public
static forInvalidExpiresValue() : static
Return values
staticforInvalidFile()
public
static forInvalidFile(string $path) : static
Parameters
- $path : string
Return values
staticforInvalidHostPrefix()
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
staticforInvalidSameSite()
Thrown when the `SameSite` attribute given is not of the valid types.
public
static forInvalidSameSite(string $sameSite) : static
Parameters
- $sameSite : string
Return values
staticforInvalidSameSiteNone()
Thrown when the `SameSite` attribute is set to `None` but the `Secure` attribute is not set.
public
static forInvalidSameSiteNone() : static
Return values
staticforInvalidSecurePrefix()
Thrown when using the `__Secure-` prefix but the `Secure` attribute is not set to true.
public
static forInvalidSecurePrefix() : static
Return values
staticforMissingExtension()
public
static forMissingExtension(string $extension) : static
No longer used.
Parameters
- $extension : string
Return values
staticforNoHandlers()
public
static forNoHandlers(string $class) : static
Parameters
- $class : string
Return values
staticforUnknownCookieInstance()
Thrown when the queried Cookie object does not exist in the cookie collection.
public
static forUnknownCookieInstance(array<int, string> $data) : static
Parameters
- $data : array<int, string>