@@ 92-104 (lines=13) @@ | ||
89 | * @param \DOMNode $node |
|
90 | * @return array |
|
91 | */ |
|
92 | private function decodeObjectNode(\DOMNode $node): array |
|
93 | { |
|
94 | $data = []; |
|
95 | foreach ($node->childNodes as $childNode) { |
|
96 | if ($childNode instanceof \DOMText) { |
|
97 | continue; |
|
98 | } |
|
99 | ||
100 | $data[$childNode->getAttribute('name')] = $this->decodeNode($childNode); |
|
101 | } |
|
102 | ||
103 | return $data; |
|
104 | } |
|
105 | ||
106 | /** |
|
107 | * @param \DOMNode $node |
|
@@ 110-122 (lines=13) @@ | ||
107 | * @param \DOMNode $node |
|
108 | * @return array |
|
109 | */ |
|
110 | private function decodeArrayNode(\DOMNode $node): array |
|
111 | { |
|
112 | $data = []; |
|
113 | foreach ($node->childNodes as $childNode) { |
|
114 | if ($childNode instanceof \DOMText) { |
|
115 | continue; |
|
116 | } |
|
117 | ||
118 | $data[] = $this->decodeNode($childNode); |
|
119 | } |
|
120 | ||
121 | return $data; |
|
122 | } |
|
123 | ||
124 | /** |
|
125 | * @param \DOMNode $node |