Skip to content

Commit 7dcfc67

Browse files
authored
Allow passing of saveXML options (#235)
* Allow passing of saveXML options * Feedback
1 parent 4a5aa67 commit 7dcfc67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ArrayToXml.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ public static function convert(
9090
return $converter->toXml();
9191
}
9292

93-
public function toXml(): string
93+
public function toXml($options = 0): string
9494
{
9595
return $this->addXmlDeclaration
96-
? $this->document->saveXML()
97-
: $this->document->saveXML($this->document->documentElement);
96+
? $this->document->saveXML(options: $options)
97+
: $this->document->saveXML($this->document->documentElement, $options);
9898
}
9999

100100
public function toDom(): DOMDocument

0 commit comments

Comments
 (0)