public function updateHost($hostname, $addInfo, $removeInfo, $updateInfo)
{
#
# Object create structure
#
$this->hostobject->appendChild($this->createElement('host:name', $hostname));
if ($addInfo instanceof eppHost) {
$addcmd = $this->createElement('host:add');
$this->addHostChanges($addcmd, $addInfo);
$this->hostobject->appendChild($addcmd);
}
if ($removeInfo instanceof eppHost) {
$remcmd = $this->createElement('host:rem');
$this->addHostChanges($remcmd, $removeInfo);
$this->hostobject->appendChild($remcmd);
}
if ($updateInfo instanceof eppHost) {
if ($updateInfo->getHostname() != $hostname) {
// The update command command can only contain a hostname
$chgcmd = $this->createElement('host:chg');
if (strlen($updateInfo->getHostname()) > 0) {
$chgcmd->appendChild($this->createElement('host:name', $updateInfo->getHostname()));
} else {
throw new eppException('New hostname must be specified on host:update command');
}
$this->hostobject->appendChild($chgcmd);
}
}
}