TypeCastingFailed
extends RuntimeException
in package
implements
SerializationFailed
FinalYes
Table of Contents
Interfaces
Properties
- $info : TypeCastingInfo|null
Methods
- __construct() : mixed
- dueToInvalidValue() : self
- dueToNotNullableType() : self
- dueToUndefinedValue() : self
- format() : string
Properties
$info read-only
public
TypeCastingInfo|null
$info
Methods
__construct()
public
__construct(string $message[, int $code = 0 ][, Throwable|null $previous = null ][, TypeCastingInfo|null $info = null ]) : mixed
Parameters
- $message : string
- $code : int = 0
- $previous : Throwable|null = null
- $info : TypeCastingInfo|null = null
dueToInvalidValue()
public
static dueToInvalidValue(mixed $value, string $type[, Throwable|null $previous = null ][, TypeCastingInfo|null $info = null ]) : self
Parameters
- $value : mixed
- $type : string
- $previous : Throwable|null = null
- $info : TypeCastingInfo|null = null
Return values
selfdueToNotNullableType()
public
static dueToNotNullableType(string $type[, Throwable|null $exception = null ][, TypeCastingInfo|null $info = null ]) : self
Parameters
- $type : string
- $exception : Throwable|null = null
- $info : TypeCastingInfo|null = null
Return values
selfdueToUndefinedValue()
public
static dueToUndefinedValue(string|int $offset[, TypeCastingInfo|null $info = null ]) : self
Parameters
- $offset : string|int
- $info : TypeCastingInfo|null = null
Return values
selfformat()
private
static format(string $message[, TypeCastingInfo|null $info = null ]) : string
Parameters
- $message : string
- $info : TypeCastingInfo|null = null