blob: be175418ec013f7b3a2ccffec2e244918fe35379 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
<?php
class Errors {
const E_SUCCESS = "E_SUCCESS";
const E_UNAUTHORIZED = "E_UNAUTHORIZED";
const E_UNKNOWN_METHOD = "E_UNKNOWN_METHOD";
const E_UNKNOWN_PLUGIN = "E_UNKNOWN_PLUGIN";
const E_SCHEMA_MISMATCH = "E_SCHEMA_MISMATCH";
static function to_json(string $code) {
return json_encode(["error" => ["code" => $code]]);
}
}
|