This repository has been archived on 2023-10-21. You can view files and clone it, but cannot push or open issues or pull requests.
patchouli/src/ErrorResponse.php
2020-12-29 02:40:16 +00:00

22 lines
468 B
PHP

<?php
namespace Patchouli;
use FWIF\FWIFSerializable;
class ErrorResponse implements FWIFSerializable {
private int $code;
private string $message;
public function __construct(int $code, string $message = 'An unspecified error occurred.') {
$this->code = $code;
$this->message = $message;
}
public function fwifSerialize() {
return [
'c' => $this->code,
'm' => $this->message,
];
}
}