Metaregistrar\EPP\eppUndeleteRequest::setDomain PHP Method

setDomain() public method

public setDomain ( eppDomain $domain )
$domain eppDomain
    public function setDomain(eppDomain $domain)
    {
        if (!strlen($domain->getDomainname())) {
            throw new eppException('eppUndeleteRequest domain object does not contain a valid domain name');
        }
        #
        # Object delete structure
        #
        $commandext = $this->createElement('ext:command');
        $undelete = $this->createElement('ext:undelete');
        $undelete->appendChild($this->createElement('domain:name', $domain->getDomainname()));
        $commandext->appendChild($undelete);
        $this->getExtension()->appendChild($commandext);
    }