CastException
extends CastException
in package
CastException is thrown for invalid cast 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
- forEnabledZlibOutputCompression() : static
- forFabricatorCreateFailed() : static
- forInvalidDirectory() : static
- forInvalidFile() : static
- forInvalidInterface() : static
- Thrown when the cast class does not extends BaseCast.
- forInvalidJsonFormat() : static
- Thrown when the Json format is invalid.
- forInvalidMethod() : static
- Thrown when the cast method is not `get` or `set`.
- forInvalidTimestamp() : static
- Thrown when the casting timestamp is not correct timestamp.
- forMissingExtension() : static
- forNoHandlers() : static
- getExitCode() : int
- Returns exit status code.
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
staticforEnabledZlibOutputCompression()
public
static forEnabledZlibOutputCompression() : static
Return values
staticforFabricatorCreateFailed()
public
static forFabricatorCreateFailed(string $table, string $reason) : static
Parameters
- $table : string
- $reason : string
Return values
staticforInvalidDirectory()
public
static forInvalidDirectory(string $path) : static
Parameters
- $path : string
Return values
staticforInvalidFile()
public
static forInvalidFile(string $path) : static
Parameters
- $path : string
Return values
staticforInvalidInterface()
Thrown when the cast class does not extends BaseCast.
public
static forInvalidInterface(string $class) : static
Parameters
- $class : string
Return values
staticforInvalidJsonFormat()
Thrown when the Json format is invalid.
public
static forInvalidJsonFormat(int $error) : static
Parameters
- $error : int
Return values
staticforInvalidMethod()
Thrown when the cast method is not `get` or `set`.
public
static forInvalidMethod(string $method) : static
Parameters
- $method : string
Return values
staticforInvalidTimestamp()
Thrown when the casting timestamp is not correct timestamp.
public
static forInvalidTimestamp() : 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
staticgetExitCode()
Returns exit status code.
public
getExitCode() : int