public function rewriteSecProfXML() { if ($this->secprofroot !== null) { DH::clearDomNodeChilds($this->secprofroot); } if ($this->secproftype == 'group') { if ($this->secprofroot === null || $this->secprofroot === false) { $this->secprofroot = DH::createElement($this->xmlroot, 'profile-setting'); } else { $this->xmlroot->appendChild($this->secprofroot); } $tmp = $this->secprofroot->ownerDocument->createElement('group'); $tmp = $this->secprofroot->appendChild($tmp); $tmp = $tmp->appendChild($this->secprofroot->ownerDocument->createElement('member')); $tmp->appendChild($this->secprofroot->ownerDocument->createTextNode($this->secprofgroup)); } else { if ($this->secproftype == 'profiles') { if ($this->secprofroot === null || $this->secprofroot === false) { $this->secprofroot = DH::createElement($this->xmlroot, 'profile-setting'); } else { $this->xmlroot->appendChild($this->secprofroot); } $tmp = $this->secprofroot->ownerDocument->createElement('profiles'); $tmp = $this->secprofroot->appendChild($tmp); foreach ($this->secprofprofiles as $index => $value) { $type = $tmp->appendChild($this->secprofroot->ownerDocument->createElement($index)); $ntmp = $type->appendChild($this->secprofroot->ownerDocument->createElement('member')); $ntmp->appendChild($this->secprofroot->ownerDocument->createTextNode($value)); } } elseif ($this->secprofroot !== null) { DH::removeChild($this->xmlroot, $this->secprofroot); } } }
public function rewriteAddressGroupStoreXML() { DH::clearDomNodeChilds($this->addrgroot); foreach ($this->addrg as $s) { $this->addrgroot->appendChild($s->xmlroot); } }
/** * Rewrite XML for this object, useful after a batch editing to save computing time. * You should not need to call it by yourself in normal situations * */ public function rewriteXML() { DH::clearDomNodeChilds($this->xmlroot); foreach ($this->rules as $rule) { $this->xmlroot->appendChild($rule->xmlroot); } if ($this->isPreOrPost) { DH::clearDomNodeChilds($this->postRulesRoot); foreach ($this->postRules as $rule) { $this->postRulesRoot->appendChild($rule->xmlroot); } } }