| 1 | <?php |
||
| 16 | final class JSendErrorResponse extends AbstractJSendResponse implements JSendErrorResponseInterface |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | private $message; |
||
| 22 | /** |
||
| 23 | * @var int|null |
||
| 24 | */ |
||
| 25 | private $code; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * JSendErrorResponse constructor. |
||
| 29 | * |
||
| 30 | * @param StatusInterface $status |
||
| 31 | * @param array $response |
||
| 32 | */ |
||
| 33 | public function __construct(StatusInterface $status, array $response) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return int|null |
||
| 47 | */ |
||
| 48 | public function getCode(): ?int |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | public function getMessage(): string |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return array |
||
| 63 | */ |
||
| 64 | public function asArray(): array |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @return JSendErrorResponseInterface |
||
| 79 | */ |
||
| 80 | public function getError(): JSendErrorResponseInterface |
||
| 84 | } |
||
| 85 |