public function setDomainCancel(eppDomain $domain)
{
#
# Object create structure
#
$transfer = $this->createElement('transfer');
$transfer->setAttribute('op', self::OPERATION_CANCEL);
$this->domainobject = $this->createElement('domain:transfer');
$this->domainobject->appendChild($this->createElement('domain:name', $domain->getDomainname()));
if (strlen($domain->getAuthorisationCode())) {
$authinfo = $this->createElement('domain:authInfo');
$authinfo->appendChild($this->createElement('domain:pw', $domain->getAuthorisationCode()));
$this->domainobject->appendChild($authinfo);
}
$transfer->appendChild($this->domainobject);
$this->getCommand()->appendChild($transfer);
}