public function setDomain(eppDomain $domain, $expdate = null) { # # Object create structure # $this->domainobject->appendChild($this->createElement('domain:name', $domain->getDomainname())); if ($expdate) { $this->domainobject->appendChild($this->createElement('domain:curExpDate', $expdate)); } if ($domain->getPeriod() > 0) { $domainperiod = $this->createElement('domain:period', $domain->getPeriod()); $domainperiod->setAttribute('unit', $domain->getPeriodUnit()); $this->domainobject->appendChild($domainperiod); } }