CodeIgniter v4.6 API

SecurityException extends FrameworkException
in package
implements HTTPExceptionInterface

Class FrameworkException

A collection of exceptions thrown by the framework that can only be determined at run time.

Table of Contents

Interfaces

HTTPExceptionInterface
Interface for Exceptions that has exception code as HTTP status code.

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
forDisallowedAction()  : static
Throws when some specific action is not allowed.
forEnabledZlibOutputCompression()  : static
forFabricatorCreateFailed()  : static
forInsecureCookie()  : static
Throws if a secure cookie is dispatched when the current connection is not secure.
forInvalidControlChars()  : static
Throws when the source string contains invalid control characters.
forInvalidDirectory()  : static
forInvalidFile()  : static
forInvalidSameSite()  : static
forInvalidUTF8Chars()  : static
Throws when the source string contains invalid UTF-8 characters.
forMissingExtension()  : static
forNoHandlers()  : static

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

forDisallowedAction()

Throws when some specific action is not allowed.

public static forDisallowedAction() : static

This is used for CSRF protection.

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

forInsecureCookie()

Throws if a secure cookie is dispatched when the current connection is not secure.

public static forInsecureCookie() : static
Return values
static

forInvalidControlChars()

Throws when the source string contains invalid control characters.

public static forInvalidControlChars(string $source, string $string) : static
Parameters
$source : string

The source string

$string : string

The invalid string

Return values
static

forInvalidDirectory()

public static forInvalidDirectory(string $path) : static
Parameters
$path : string
Return values
static

forInvalidFile()

public static forInvalidFile(string $path) : static
Parameters
$path : string
Return values
static

forInvalidSameSite()

public static forInvalidSameSite(string $samesite) : static

Use CookieException::forInvalidSameSite() instead.

Parameters
$samesite : string
Tags
codeCoverageIgnore
Return values
static

forInvalidUTF8Chars()

Throws when the source string contains invalid UTF-8 characters.

public static forInvalidUTF8Chars(string $source, string $string) : static
Parameters
$source : string

The source string

$string : string

The invalid string

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

        
On this page

Search results