프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$data | array | Optional error data appended with the response. | |
$errorCode | string | The error code used to identify the error. | |
$message | string | A descriptive error message explaining what went wrong. | |
$parameters | array | Any parameters used to build the error message. | |
$statusCode | integer | The HTTP status code for the response. | |
$translator | Symfony\Component\Translation\TranslatorInterface | Translator service used for translating stuff. |
메소드 | 설명 | |
---|---|---|
__construct ( Illuminate\Contracts\Routing\ResponseFactory | |
Constructor. | |
addData ( array $data ) : |
Add additonal data appended to the error object. | |
setError ( string $errorCode = null, string | array | null $message = null ) : |
Set the error code and optionally an error message. | |
setStatus ( integer $statusCode ) : |
Set the HTTP status code for the response. | |
toArray ( ) : array | Serialize the data and return as an array. |
메소드 | 설명 | |
---|---|---|
buildErrorData ( ) : array | null | Build the error object of the serialized response data. | |
resolveMessage ( ) : string | null | Resolve an error message from the translator. |
public __construct ( Illuminate\Contracts\Routing\ResponseFactory | |
||
$responseFactory | Illuminate\Contracts\Routing\ResponseFactory | |
|
$translator | Symfony\Component\Translation\TranslatorInterface |
protected buildErrorData ( ) : array | null | ||
리턴 | array | null |
protected resolveMessage ( ) : string | null | ||
리턴 | string | null |
protected string $errorCode | ||
리턴 | string |
protected string $message | ||
리턴 | string |
protected array $parameters | ||
리턴 | array |
protected int $statusCode | ||
리턴 | integer |