1 | <?php |
||
7 | final class XmlDecoderType implements DecoderTypeInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var int |
||
11 | */ |
||
12 | private $options; |
||
13 | |||
14 | /** |
||
15 | * @param int $options |
||
16 | */ |
||
17 | public function __construct($options = 0) |
||
21 | |||
22 | /** |
||
23 | * @return string |
||
24 | */ |
||
25 | public function getContentType(): string |
||
29 | |||
30 | /** |
||
31 | * @param string $data |
||
32 | * |
||
33 | * @return array |
||
34 | * |
||
35 | * @throws DecoderException |
||
36 | */ |
||
37 | public function decode(string $data): array |
||
47 | |||
48 | /** |
||
49 | * @param \DOMElement $node |
||
50 | * |
||
51 | * @return array |
||
52 | */ |
||
53 | private function transformType(\DOMElement $node): array |
||
90 | |||
91 | /** |
||
92 | * @param \DOMElement $node |
||
93 | * |
||
94 | * @return string|int |
||
95 | */ |
||
96 | private function getKey(\DOMElement $node) |
||
109 | |||
110 | /** |
||
111 | * @param \DOMElement $node |
||
112 | * |
||
113 | * @return bool|string |
||
114 | */ |
||
115 | private function getValue(\DOMElement $node) |
||
127 | } |
||
128 |