element = new \PSC\Library\Calc\Option\Type\Text(); } public function parseJSON(): PSCText { parent::parseJson(); if(isset($this->json['dependencys']) && count($this->json['dependencys']) > 0) { $edgeCollectionContainerParser = new EdgeCollectionContainer(); $edgeCollectionContainerParser->fromJson($this->json['dependencys']); $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseJson()); } return $this->element; } public function parseXML(): PSCText { parent::parseXML(); if($this->node->data) { $this->element->setValue((string)$this->node->data); } if($this->element->getDefault() != null) { $this->element->setValue($this->element->getDefault()); } if($this->node->children()) { $edgeCollectionContainerParser = new EdgeCollectionContainer(); $edgeCollectionContainerParser->fromXML($this->node); $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseXML()); } return $this->element; } }