element = new \PSC\Library\Calc\Option\Type\Input(); } public function parseJson(): PSCInput { parent::parseJson(); if(isset($this->json['placeHolder'])) { $this->element->setPlaceHolder((string)$this->json['placeHolder']); } 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(): PSCInput { parent::parseXML(); if(isset($this->node['min'])) { $this->element->setMinValue((int)$this->node['min']); } if(isset($this->node['max'])) { $this->element->setMaxValue((int)$this->node['max']); } if(isset($this->node['pattern'])) { $this->element->setPattern((string)$this->node['pattern']); } if(isset($this->node['placeholder'])) { $this->element->setPlaceHolder((string)$this->node['placeholder']); } if($this->node->children()) { $edgeCollectionContainerParser = new EdgeCollectionContainer(); $edgeCollectionContainerParser->fromXML($this->node); $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseXML()); } return $this->element; } }