Error extends Error
This object holds a validation error.
Table of Contents
Properties
- $arguments : array<string|int, mixed>
- The message arguments. Will be replaced in the message body.
- $code : int
- $message : string
- The default (english) error message
- $title : string
- An optional title for the message (used eg. in flashMessages).
Methods
- __construct() : mixed
- Constructs this error
- __toString() : string
- Converts this error into a string
- getArguments() : array<string|int, mixed>
- Get arguments
- getCode() : int
- Returns the error code
- getMessage() : string
- Returns the error message
- getTitle() : string
- Get title
- render() : string
- Return the rendered message
Properties
$arguments
The message arguments. Will be replaced in the message body.
protected
array<string|int, mixed>
$arguments
= []
$code
protected
int
$code
= 1201447005
$message
The default (english) error message
protected
string
$message
= 'Unknown validation error'
$title
An optional title for the message (used eg. in flashMessages).
protected
string
$title
= ''
Methods
__construct()
Constructs this error
public
__construct(string $message, int $code[, array<string|int, mixed> $arguments = [] ][, string $title = '' ]) : mixed
Parameters
- $message : string
-
An english error message which is used if no other error message can be resolved
- $code : int
-
A unique error code
- $arguments : array<string|int, mixed> = []
-
Array of arguments to be replaced in message
- $title : string = ''
-
optional title for the message
__toString()
Converts this error into a string
public
__toString() : string
Return values
stringgetArguments()
Get arguments
public
getArguments() : array<string|int, mixed>
Return values
array<string|int, mixed>getCode()
Returns the error code
public
getCode() : int
Return values
int —The error code
getMessage()
Returns the error message
public
getMessage() : string
Return values
string —The error message
getTitle()
Get title
public
getTitle() : string
Return values
stringrender()
Return the rendered message
public
render() : string