@@ 74-86 (lines=13) @@ | ||
71 | * @param \DOMNode $node |
|
72 | * @return array |
|
73 | */ |
|
74 | private function decodeObjectNode(\DOMNode $node): array |
|
75 | { |
|
76 | $data = []; |
|
77 | foreach ($node->childNodes as $childNode) { |
|
78 | if ($childNode instanceof \DOMText) { |
|
79 | continue; |
|
80 | } |
|
81 | ||
82 | $data[$childNode->getAttribute('name')] = $this->decodeNode($childNode); |
|
83 | } |
|
84 | ||
85 | return $data; |
|
86 | } |
|
87 | ||
88 | /** |
|
89 | * @param \DOMNode $node |
|
@@ 92-104 (lines=13) @@ | ||
89 | * @param \DOMNode $node |
|
90 | * @return array |
|
91 | */ |
|
92 | private function decodeArrayNode(\DOMNode $node): array |
|
93 | { |
|
94 | $data = []; |
|
95 | foreach ($node->childNodes as $childNode) { |
|
96 | if ($childNode instanceof \DOMText) { |
|
97 | continue; |
|
98 | } |
|
99 | ||
100 | $data[] = $this->decodeNode($childNode); |
|
101 | } |
|
102 | ||
103 | return $data; |
|
104 | } |
|
105 | ||
106 | /** |
|
107 | * @param \DOMNode $node |