1 | <?php |
||
7 | final class Decoder implements DecoderInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var DecoderTypeInterface[] |
||
11 | */ |
||
12 | private $decoders; |
||
13 | |||
14 | /** |
||
15 | * @param DecoderTypeInterface[] $decoders |
||
16 | */ |
||
17 | public function __construct(array $decoders) |
||
24 | |||
25 | /** |
||
26 | * @param DecoderTypeInterface $decoder |
||
27 | */ |
||
28 | private function addDecoder(DecoderTypeInterface $decoder) |
||
32 | |||
33 | /** |
||
34 | * @return array |
||
35 | */ |
||
36 | public function getContentTypes(): array |
||
40 | |||
41 | /** |
||
42 | * @param string $data |
||
43 | * @param string $contentType |
||
44 | * |
||
45 | * @return array |
||
46 | * |
||
47 | * @throws DecoderException |
||
48 | */ |
||
49 | public function decode(string $data, string $contentType): array |
||
57 | } |
||
58 |