File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -127,9 +127,15 @@ public function setNode(null|string|\DOMNode $node): self
127
127
*/
128
128
public function xmlSerialize(\DOMElement $element = null, null|int|<?php echo PHPFHIR_INTERFACE_XML_SERIALIZALE_CONFIG ?> $config = null): \DOMElement
129
129
{
130
+ if (is_int($config)) {
131
+ $libxmlOpts = $config;
132
+ $config = null;
133
+ } else {
134
+ $libxmlOpts = $config?->getLibxmlOpts() ?? <?php echo PHPFHIR_INTERFACE_XML_SERIALIZALE_CONFIG ; ?> ::DEFAULT_LIBXML_OPTS;
135
+ }
130
136
if (null === $element) {
131
137
$dom = new \DOMDocument();
132
- $dom->loadXML($this->_getFHIRXMLElementDefinition('<?php echo $ xmlName ; ?> '), $config?->getLibxmlOpts() ?? 0 );
138
+ $dom->loadXML($this->_getFHIRXMLElementDefinition('<?php echo $ xmlName ; ?> '), $libxmlOpts );
133
139
$element = $dom->documentElement;
134
140
}
135
141
$node = $this->getNode();
You can’t perform that action at this time.
0 commit comments