ErrorContent extends Model
Content of error messages, and sub-errors messages if any
Table of Contents
- $errors : array<string|int, mixed>|null
- List of errors that occured during request
- $message : string|null
- General error message
- from() : static
- Initializing a model from an array
- getErrors() : array<string|int, ErrorsItem>
- Getter for errors
- getMessage() : string
- Getter for message
- jsonSerialize() : array<string|int, mixed>
- setErrors() : static
- Setter for errors
- setMessage() : static
- Setter for message
Properties
$errors
List of errors that occured during request
protected
array<string|int, mixed>|null
$errors
= null
$message
General error message
protected
string|null
$message
= null
Methods
from()
Initializing a model from an array
public
static from(array<string|int, mixed> $params) : static
Parameters
- $params : array<string|int, mixed>
-
Pass this parameter if you want to initial property value from an array. See API reference for all property names and types
Tags
Return values
static —getErrors()
Getter for errors
public
getErrors() : array<string|int, ErrorsItem>
Return values
array<string|int, ErrorsItem> —List of errors that occured during request
getMessage()
Getter for message
public
getMessage() : string
Return values
string —General error message
jsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —setErrors()
Setter for errors
public
setErrors(array<string|int, ErrorsItem> $errors) : static
Parameters
- $errors : array<string|int, ErrorsItem>
-
List of errors that occured during request
Return values
static —To use in method chains
setMessage()
Setter for message
public
setMessage(string $message) : static
Parameters
- $message : string
-
General error message
Return values
static —To use in method chains