params); // Return the complete result. return $result; } /** * Process an array of parameters. * * @param \SimpleXMLElement $parent * @return array */ protected static function _parseArray(\SimpleXMLElement $parent): array { $result = array(); foreach ($parent->children() ?: [] as $tag) { $key = $tag->getName(); if (strval($tag['type']) === 'array') { $result[$key] = self::_parseArray($tag); } else { $result[$key] = strval($tag); } } return $result; } }