コード例 #1
0
 public function setHost(eppHost $host)
 {
     if (!strlen($host->getHostname())) {
         throw new eppException('eppDeleteRequest host object does not contain a valid hostname');
     }
     $this->hostobject->appendChild($this->createElement('host:name', $host->getHostname()));
 }
コード例 #2
0
 /**
  *
  * @param string $hostname
  * @param eppHost $addInfo
  * @param eppHost $removeInfo
  * @param eppHost $updateInfo
  * @return \DOMElement
  * @throws eppException
  */
 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);
         }
     }
 }
コード例 #3
0
 public function setHost(eppHost $host)
 {
     if (!strlen($host->getHostname())) {
         throw new eppException('eppDeleteRequest host object does not contain a valid hostname');
     }
     #
     # Object delete structure
     #
     $this->hostobject = $this->createElement('delete');
     $hostdelete = $this->createElement('host:delete');
     $hostdelete->appendChild($this->createElement('host:name', $host->getHostname()));
     $this->hostobject->appendChild($hostdelete);
     $this->getCommand()->appendChild($this->hostobject);
 }
コード例 #4
0
 public function setHost(eppHost $host)
 {
     #
     # Domain check structure
     #
     $this->hostobject->appendChild($this->createElement('host:name', $host->getHostname()));
 }
コード例 #5
0
 private function addNsGroup(eppHost $host)
 {
     if (!strlen($host->getHostname())) {
         throw new eppException('No valid hostname in create host request');
     }
     #
     # Object create structure
     #
     $create = $this->createElement('create');
     $this->hostobject = $this->createElement('nsgroup:create');
     $this->hostobject->appendChild($this->createElement('nsgroup:name', $host->getHostname()));
     $this->hostobject->appendChild($this->createElement('nsgroup:ns', $host->getHostname()));
     $create->appendChild($this->hostobject);
     $this->getCommand()->appendChild($create);
     return;
 }
コード例 #6
0
 /**
  *
  * @param eppHost $host
  * @return \DOMElement
  * @throws eppException
  */
 public function setHost(eppHost $host)
 {
     if (!strlen($host->getHostname())) {
         throw new eppException('No valid hostname in create host request');
     }
     #
     # Object create structure
     #
     $this->hostobject->appendChild($this->createElement('host:name', $host->getHostname()));
     $addresses = $host->getIpAddresses();
     if (is_array($addresses)) {
         foreach ($addresses as $address => $type) {
             $ipaddress = $this->createElement('host:addr', $address);
             $ipaddress->setAttribute('ip', $type);
             $this->hostobject->appendChild($ipaddress);
         }
     }
     return;
 }
コード例 #7
0
 public function setHost(eppHost $host)
 {
     #
     # Domain check structure
     #
     $info = $this->createElement('info');
     $this->hostobject = $this->createElement('host:info');
     $this->hostobject->appendChild($this->createElement('host:name', $host->getHostname()));
     $info->appendChild($this->hostobject);
     $this->getCommand()->appendChild($info);
 }
コード例 #8
0
 /**
  *
  * @param eppHost $host
  * @return \domElement
  */
 private function addDomainHostObj(eppHost $host)
 {
     $ns = $this->createElement('domain:hostObj', $host->getHostname());
     return $ns;
 }