public function setDomainNames($domains) { # # Domain check structure # $check = $this->createElement('check'); $this->domainobject = $this->createElement('domain:check'); 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)); } } $check->appendChild($this->domainobject); $this->getCommand()->appendChild($check); }