1 | <?php |
||
12 | final class JSend |
||
13 | { |
||
14 | /** |
||
15 | * @param array $response |
||
16 | * |
||
17 | * @return JSendResponseInterface |
||
18 | */ |
||
19 | private static function interpret(array $response): JSendResponseInterface |
||
32 | |||
33 | /** |
||
34 | * @param string $json |
||
35 | * |
||
36 | * @return JSendResponseInterface |
||
37 | * @throws \Seld\JsonLint\ParsingException |
||
38 | */ |
||
39 | public static function decode(string $json): JSendResponseInterface |
||
46 | |||
47 | /** |
||
48 | * @param array $response |
||
49 | * @param int $options |
||
50 | * |
||
51 | * @return string |
||
52 | */ |
||
53 | public static function encode(array $response, int $options = 0): string |
||
64 | |||
65 | /** |
||
66 | * @param JSendResponseInterface $response |
||
67 | * |
||
68 | * @return int|null |
||
69 | */ |
||
70 | public static function getDefaultHttpStatusCode(JSendResponseInterface $response): ?int |
||
82 | |||
83 | /** |
||
84 | * @param JSendResponseInterface $response |
||
85 | * @param int|null $code |
||
86 | */ |
||
87 | public static function render(JSendResponseInterface $response, int $code = null): void |
||
96 | } |
||
97 |