1 | <?php |
||
14 | final class Json extends ContentFormatter |
||
15 | { |
||
16 | private const DEFAULT_FLAGS = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_SLASHES; |
||
17 | |||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | private $flags; |
||
22 | |||
23 | public function __construct(int $flags = self::DEFAULT_FLAGS) |
||
27 | |||
28 | protected function formatContent($content, array $attributes = []): string |
||
36 | |||
37 | protected function formatException(Throwable $e): string |
||
51 | |||
52 | protected function encode($data): string |
||
59 | } |
||
60 |