| 1 | <?php |
||
| 15 | final class Json extends ContentOnly |
||
| 16 | { |
||
| 17 | private const DEFAULT_FLAGS = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_SLASHES; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var int |
||
| 21 | */ |
||
| 22 | private $flags; |
||
| 23 | |||
| 24 | public function __construct(int $flags = self::DEFAULT_FLAGS) |
||
| 28 | |||
| 29 | public function formatContent($content, array $attributes = []): string |
||
| 37 | |||
| 38 | protected function formatException(Throwable $e): string |
||
| 53 | |||
| 54 | protected function encode($data): string |
||
| 61 | } |
||
| 62 |