Skip to content

Commit

Permalink
Renamed class properties
Browse files Browse the repository at this point in the history
  • Loading branch information
ruff committed Jun 4, 2024
1 parent 22815e5 commit 0e025e6
Show file tree
Hide file tree
Showing 3 changed files with 653 additions and 653 deletions.
20 changes: 10 additions & 10 deletions src/XmlConverterBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,29 @@ abstract class XmlConverterBase
*
* @var XmlDocumentReader
*/
protected $in = null;
protected $source = null;

/**
* The output document
*
* @var XmlDocumentWriter
*/
protected $out = null;
protected $destination = null;

/**
* Constructor
*/
protected final function __construct()
{
$this->in = (new XmlDocumentReader());
$this->out = (new XmlDocumentWriter($this->getDestinationRoot()));
$this->source = (new XmlDocumentReader());
$this->destination = (new XmlDocumentWriter($this->getDestinationRoot()));

foreach ($this->getSourceNamespaces() as $namespace => $namespaceUri) {
$this->in->addNamespace($namespace, $namespaceUri);
$this->source->addNamespace($namespace, $namespaceUri);
}

foreach ($this->getDestinationNamespaces() as $namespace => $namespaceUri) {
$this->out->addNamespace($namespace, $namespaceUri);
$this->destination->addNamespace($namespace, $namespaceUri);
}
}

Expand All @@ -63,7 +63,7 @@ protected final function __construct()
*/
public function loadFromXmlString(string $source): XmlConverterCiiToUbl
{
$this->in->loadFromXmlString($source);
$this->source->loadFromXmlString($source);

return $this;
}
Expand All @@ -81,7 +81,7 @@ public function loadFromXmlFile(string $filename): XmlConverterCiiToUbl
throw new RuntimeException("File $filename does not exists");
}

$this->in->loadFromXmlFile($filename);
$this->source->loadFromXmlFile($filename);

return $this;
}
Expand All @@ -93,7 +93,7 @@ public function loadFromXmlFile(string $filename): XmlConverterCiiToUbl
*/
public function saveXmlString(): string
{
return $this->out->saveXmlString();
return $this->destination->saveXmlString();
}

/**
Expand All @@ -104,7 +104,7 @@ public function saveXmlString(): string
*/
public function saveXmlFile(string $filename)
{
return $this->out->saveXmlFile($filename);
return $this->destination->saveXmlFile($filename);
}

/**
Expand Down
Loading

0 comments on commit 0e025e6

Please sign in to comment.