FieldError extends EntityError
Table of Contents
Constants
- EMPTY_REQUIRED = 'BX_EMPTY_REQUIRED'
- INVALID_VALUE = 'BX_INVALID_VALUE'
Methods
- __construct() : mixed
- Creates a new Error.
- __toString() : mixed
- __unserialize() : void
- Disables deserialization.
- createFromThrowable() : static
- getCode() : int|string
- Returns the code of the error.
- getCustomData() : mixed|null
- getField() : mixed
- getLocalizableMessage() : LocalizableMessageInterface|null
- getMessage() : string
- Returns the message of the error.
- jsonSerialize() : mixed
- Specify data which should be serialized to JSON
Constants
EMPTY_REQUIRED
public
mixed
EMPTY_REQUIRED
= 'BX_EMPTY_REQUIRED'
INVALID_VALUE
public
mixed
INVALID_VALUE
= 'BX_INVALID_VALUE'
Methods
__construct()
Creates a new Error.
public
__construct(Field $field, mixed $message[, mixed $code = 'BX_ERROR' ]) : mixed
Parameters
- $field : Field
- $message : mixed
-
Message of the error.
- $code : mixed = 'BX_ERROR'
-
Code of the error.
__toString()
public
__toString() : mixed
__unserialize()
Disables deserialization.
public
__unserialize(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
createFromThrowable()
public
static createFromThrowable(Throwable $exception) : static
Parameters
- $exception : Throwable
Return values
staticgetCode()
Returns the code of the error.
public
getCode() : int|string
Return values
int|stringgetCustomData()
public
getCustomData() : mixed|null
Return values
mixed|nullgetField()
public
getField() : mixed
getLocalizableMessage()
public
getLocalizableMessage() : LocalizableMessageInterface|null
Return values
LocalizableMessageInterface|nullgetMessage()
Returns the message of the error.
public
getMessage() : string
Return values
stringjsonSerialize()
Specify data which should be serialized to JSON
public
jsonSerialize() : mixed
Tags
Attributes
- #[ReturnTypeWillChange]
Return values
mixed —data which can be serialized by json_encode, which is a value of any type other than a resource.