CodeIgniter v4.5 API

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
static

forEmptyCookieName()

Thrown when the cookie name is empty.

public static forEmptyCookieName() : static
Return values
static

forEnabledZlibOutputCompression()

public static forEnabledZlibOutputCompression() : static
Return values
static

forFabricatorCreateFailed()

public static forFabricatorCreateFailed(string $table, string $reason) : static
Parameters
$table : string
$reason : string
Return values
static

forInvalidCookieInstance()

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
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

forInvalidDirectory()

public static forInvalidDirectory(string $path) : static
Parameters
$path : 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) : static
Parameters
$path : string
Return values
static

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) : static

No longer used.

Parameters
$extension : string
Return values
static

forNoHandlers()

public static forNoHandlers(string $class) : static
Parameters
$class : string
Return values
static

forUnknownCookieInstance()

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>
Return values
static

        
On this page

Search results