Пример #1
0
 public function setValue($value, $process = true)
 {
     if ($process == true) {
         $value = $this->process($value);
     }
     XmlHelper::setText($this->xml, $value != null ? $value : "");
 }
Пример #2
0
 public function setActive($active)
 {
     $xmlOptions = XmlHelper::xpath($this->xml, "/content/options/active");
     if ($xmlOptions->item(0) != null) {
         XmlHelper::setText($xmlOptions->item(0), $active);
     } else {
         $nodeActive = $this->xml->createElement("active", $active);
         $nodeParent = XmlHelper::xpath($this->xml, "/content/options");
         $nodeParent->item(0)->appendChild($nodeActive);
     }
 }
Пример #3
0
 public function setDataType($type)
 {
     $xmlType = XmlHelper::getChildNode($this->xml, "description");
     XmlHelper::setText($xmlType->item(0), $type);
 }