21 private $converterUtils;
28 $this->converterUtils = $converterUtils;
36 if ($node->nodeType !== XML_ELEMENT_NODE) {
48 private function toArray(\DOMNode $node)
51 'name' => $this->converterUtils->getComponentName($node),
54 if ($this->hasChildNodes($node)) {
57 foreach ($node->childNodes as $childNode) {
58 if ($childNode->nodeType === XML_ELEMENT_NODE) {
62 'value' => trim($childNode->nodeValue)
71 'value' => trim($node->nodeValue)
83 private function hasChildNodes(\DOMNode $node)
85 if (!$node->hasChildNodes()) {
89 foreach ($node->childNodes as $child) {
90 if ($child->nodeType == XML_ELEMENT_NODE) {
convert(\DOMNode $node, array $data=[])
__construct(ConverterUtils $converterUtils)