1 | <?php |
||
26 | final class JsonEncoder implements EncoderInterface, DecoderInterface |
||
27 | { |
||
28 | private $format; |
||
29 | private $jsonEncoder; |
||
30 | |||
31 | public function __construct(string $format, BaseJsonEncoder $jsonEncoder = null) |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public function supportsEncoding($format) |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | public function encode($data, $format, array $context = []) |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | public function supportsDecoding($format) |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | public function decode($data, $format, array $context = []) |
||
72 | } |
||
73 |