| 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) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return int|null |
||
| 43 | */ |
||
| 44 | public function getCode(): ?int |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | public function getMessage(): string |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @return array |
||
| 59 | */ |
||
| 60 | public function asArray(): array |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @internal |
||
| 73 | * |
||
| 74 | * @return array |
||
| 75 | */ |
||
| 76 | public function jsonSerialize(): array |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @return JSendErrorResponseInterface |
||
| 83 | */ |
||
| 84 | public function getError(): JSendErrorResponseInterface |
||
| 88 | } |