public function setDomain(eppDomain $domain, $hosts = null)
 {
     if (!strlen($domain->getDomainName())) {
         throw new eppException('Domain object does not contain a valid domain name');
     }
     #
     # Create command structure
     #
     $this->command = $this->createElement('command');
     #
     # Domain check structure
     #
     $info = $this->createElement('info');
     $this->domainobject = $this->createElement('domain:info');
     $info->appendChild($this->domainobject);
     $dname = $this->createElement('domain:name', $domain->getDomainName());
     if ($hosts) {
         if ($hosts == self::HOSTS_ALL || $hosts == self::HOSTS_DELEGATED || $hosts == self::HOSTS_NONE || $hosts == self::HOSTS_SUBORDINATE) {
             $dname->setAttribute('hosts', $hosts);
         } else {
             throw new eppException('Hosts parameter of inforequest can only be to be all, none, del or sub');
         }
     } else {
         $dname->setAttribute('hosts', self::HOSTS_ALL);
     }
     $this->domainobject->appendChild($dname);
     if (!$this->command) {
         $this->command = $this->getCommand();
     }
     $this->command->appendChild($info);
     if (!$this->epp) {
         $this->epp = $this->getEpp();
     }
     $this->epp->appendChild($this->command);
 }
 function __construct(eppDomain $domain, $clientdelete)
 {
     $upd = new eppDomain($domain->getDomainName());
     parent::__construct($domain, null, null, $upd);
     $this->setClientDelete($clientdelete);
     parent::addSessionId();
 }
 function __construct(eppDomain $domain, $addinfo = null, $removeinfo = null, $updateinfo = null, $forcehostattr = false)
 {
     $upd = new eppDomain($domain->getDomainName());
     parent::__construct($domain, null, null, $upd);
     $this->addTrustee();
     parent::addSessionId();
 }