CodeIgniter v4.7 API

ApiException extends FrameworkException
in package

FinalYes

Custom exception for API-related errors.

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
forEnabledZlibOutputCompression()  : static
forFabricatorCreateFailed()  : static
forInvalidDirectory()  : static
forInvalidFields()  : self
Thrown when the fields requested in a URL are not valid.
forInvalidFile()  : static
forInvalidIncludes()  : self
Thrown when the includes requested in a URL are not valid.
forInvalidTransformer()  : self
Thrown when a transformer class does not implement TransformerInterface.
forMissingExtension()  : static
forMissingInclude()  : self
Thrown when an include is requested, but the method to handle it does not exist on the model.
forNoHandlers()  : static
forTransformerNotFound()  : self
Thrown when a transformer class cannot be found.

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

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

forInvalidDirectory()

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

forInvalidFields()

Thrown when the fields requested in a URL are not valid.

public static forInvalidFields(string $field) : self
Parameters
$field : string
Return values
self

forInvalidFile()

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

forInvalidIncludes()

Thrown when the includes requested in a URL are not valid.

public static forInvalidIncludes(string $include) : self
Parameters
$include : string
Return values
self

forInvalidTransformer()

Thrown when a transformer class does not implement TransformerInterface.

public static forInvalidTransformer(string $transformerClass) : self
Parameters
$transformerClass : string
Return values
self

forMissingExtension()

public static forMissingExtension(string $extension) : static

No longer used.

Parameters
$extension : string
Return values
static

forMissingInclude()

Thrown when an include is requested, but the method to handle it does not exist on the model.

public static forMissingInclude(string $include) : self
Parameters
$include : string
Return values
self

forNoHandlers()

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

forTransformerNotFound()

Thrown when a transformer class cannot be found.

public static forTransformerNotFound(string $transformerClass) : self
Parameters
$transformerClass : string
Return values
self

        
On this page

Search results