Refactored physical interfaces in TDFs and TDF scripts

This commit is contained in:
Nav
2024-07-06 01:33:19 +01:00
parent 8aad5b9095
commit 4bb309a179
269 changed files with 632 additions and 630 deletions

View File

@@ -189,10 +189,7 @@ class FromXmlService
public function physicalInterfaceFromElement(DOMElement $element): PhysicalInterface
{
$attributes = $this->getNodeAttributesByName($element);
return new PhysicalInterface(
$attributes['name'] ?? null,
$attributes['type'] ?? null,
);
return new PhysicalInterface($attributes['value'] ?? null);
}
public function moduleFromElement(DOMElement $element): Module

View File

@@ -125,8 +125,7 @@ class ToXmlService
public function physicalInterfaceToXml(PhysicalInterface $physicalInterface, DOMDocument $document): DOMElement
{
$element = $document->createElement('physical-interface');
$element->setAttribute('name', $physicalInterface->name);
$element->setAttribute('type', $physicalInterface->type);
$element->setAttribute('value', $physicalInterface->value);
return $element;
}