Composer updates

This commit is contained in:
Clemens Schwaighofer
2023-05-29 16:21:31 +09:00
parent 250067927a
commit 7b5ad92e66
304 changed files with 11398 additions and 3199 deletions

View File

@@ -24,7 +24,8 @@ class ArrayToXml
string | null $xmlEncoding = null,
string $xmlVersion = '1.0',
array $domProperties = [],
bool | null $xmlStandalone = null
bool | null $xmlStandalone = null,
bool $addXmlDeclaration = true
) {
$this->document = new DOMDocument($xmlVersion, $xmlEncoding ?? '');
@@ -36,6 +37,8 @@ class ArrayToXml
$this->setDomProperties($domProperties);
}
$this->addXmlDeclaration = $addXmlDeclaration;
$this->replaceSpacesByUnderScoresInKeyNames = $replaceSpacesByUnderScoresInKeyNames;
if (! empty($array) && $this->isArrayAllKeySequential($array)) {
@@ -61,7 +64,8 @@ class ArrayToXml
string $xmlEncoding = null,
string $xmlVersion = '1.0',
array $domProperties = [],
bool $xmlStandalone = null
bool $xmlStandalone = null,
bool $addXmlDeclaration = true,
): string {
$converter = new static(
$array,
@@ -70,7 +74,8 @@ class ArrayToXml
$xmlEncoding,
$xmlVersion,
$domProperties,
$xmlStandalone
$xmlStandalone,
$addXmlDeclaration
);
return $converter->toXml();
@@ -80,7 +85,7 @@ class ArrayToXml
{
return $this->addXmlDeclaration
? $this->document->saveXML()
: $this->document->saveXml($this->document->documentElement);
: $this->document->saveXML($this->document->documentElement);
}
public function toDom(): DOMDocument