public function setDomainNames($domains) { # # Domain check structure # foreach ($domains as $domain) { if ($domain instanceof eppDomain) { $this->domainobject->appendChild($this->createElement('domain:name', $domain->getDomainname())); } else { $this->domainobject->appendChild($this->createElement('domain:name', $domain)); } } }