function __construct($checkrequest)
 {
     parent::__construct();
     if ($checkrequest instanceof eppDomain) {
         $this->setDomainNames(array($checkrequest));
     } else {
         if ($checkrequest instanceof eppContactHandle) {
             $this->setContactHandles(array($checkrequest));
         } else {
             if ($checkrequest instanceof eppHost) {
                 $this->setHosts(array($checkrequest));
             } else {
                 if (is_array($checkrequest)) {
                     if ($checkrequest[0] instanceof eppDomain) {
                         $this->setDomainNames($checkrequest);
                     } else {
                         if ($checkrequest[0] instanceof eppContactHandle) {
                             $this->setContactHandles($checkrequest);
                         } else {
                             if ($checkrequest[0] instanceof eppHost) {
                                 $this->setHosts($checkrequest);
                             } else {
                                 $this->setDomainNames($checkrequest);
                             }
                         }
                     }
                 }
             }
         }
     }
 }
 function __construct()
 {
     parent::__construct();
     $check = $this->createElement('check');
     $balanceobject = $this->createElement('balance');
     $check->appendChild($balanceobject);
     $this->getCommand()->appendChild($check);
 }
Ejemplo n.º 3
0
 function __construct()
 {
     parent::__construct();
     #
     # Create logout command
     #
     $logout = $this->createElement('logout');
     $this->getCommand()->appendChild($logout);
 }
 function __construct($createinfo)
 {
     parent::__construct($createinfo);
     if ($createinfo instanceof eppHost) {
         $this->addExtension('xmlns:nsgroup', 'http://www.dns.be/xml/epp/nsgroup-1.0');
         $this->addNsgroup($createinfo);
     }
     $this->addSessionId();
 }
 function __construct(eppContactHandle $deleteinfo)
 {
     parent::__construct();
     if ($deleteinfo instanceof eppContactHandle) {
         $this->setContactHandle($deleteinfo);
     } else {
         throw new eppException('parameter of eppDeleteRequest must be valid eppContactHandle object');
     }
     $this->addSessionId();
 }
Ejemplo n.º 6
0
 function __construct(eppHost $deleteinfo)
 {
     parent::__construct();
     if ($deleteinfo instanceof eppHost) {
         $this->setHost($deleteinfo);
     } else {
         throw new eppException('parameter of eppDeleteHostRequest must be eppHost object');
     }
     $this->addSessionId();
 }
Ejemplo n.º 7
0
 function __construct($inforequest)
 {
     parent::__construct();
     if ($inforequest instanceof eppContactHandle) {
         $this->setContactHandle($inforequest);
     } else {
         throw new eppException('parameter of infocontactrequest needs to be eeppContact object');
     }
     $this->addSessionId();
 }
 function __construct($restoreinfo)
 {
     parent::__construct();
     if ($restoreinfo instanceof eppDomain) {
         $this->setDomain($restoreinfo);
     } else {
         throw new eppException('parameter of eppUndeleteRequest must be valid eppDomain object');
     }
     //$this->addSessionId();
 }
Ejemplo n.º 9
0
 function __construct(eppDomain $deleteinfo)
 {
     parent::__construct();
     if ($deleteinfo instanceof eppDomain) {
         $this->setDomain($deleteinfo);
     } else {
         throw new eppException('parameter of eppDeleteDomainRequest must be eppDomain object');
     }
     $this->addSessionId();
 }
Ejemplo n.º 10
0
 public function __construct($infodomain, $hosts = null)
 {
     parent::__construct();
     if ($infodomain instanceof eppDomain) {
         $this->setDomain($infodomain, $hosts);
     } else {
         throw new eppException('parameter of infodomainrequest needs to be eppDomain object');
     }
     $this->addSessionId();
 }
 function __construct($type)
 {
     parent::__construct();
     $check = $this->createElement($type);
     $this->domainobject = $this->createElement('domain:' . $type);
     if (!$this->rootNamespaces()) {
         $this->domainobject->setAttribute('xmlns:domain', 'urn:ietf:params:xml:ns:domain-1.0');
     }
     $check->appendChild($this->domainobject);
     $this->getCommand()->appendChild($check);
 }
Ejemplo n.º 12
0
 function __construct($domain, $expdate = null)
 {
     parent::__construct();
     #
     # Sanity checks
     #
     if (!$domain instanceof eppDomain) {
         throw new eppException('eppRenewRequest needs valid eppDomain object as parameter');
     }
     $this->setDomain($domain, $expdate);
     $this->addSessionId();
 }
Ejemplo n.º 13
0
 function __construct($checkrequest)
 {
     parent::__construct();
     if ($checkrequest instanceof eppHost) {
         $this->setHosts(array($checkrequest));
     } else {
         if (is_array($checkrequest)) {
             if ($checkrequest[0] instanceof eppHost) {
                 $this->setHosts($checkrequest);
             }
         }
     }
 }
Ejemplo n.º 14
0
 function __construct($domainname)
 {
     parent::__construct();
     if (is_string($domainname)) {
         if (strlen($domainname) > 0) {
             $this->addDnsbeExtension($domainname);
         } else {
             throw new eppException("Domain name length may not be 0 on eppAuthcodeRequest");
         }
     } else {
         throw new eppException("Domain name must be string on eppAuthcodeRequest");
     }
 }
 function __construct($newpassword = null)
 {
     parent::__construct();
     #
     # Login parameters
     #
     $this->login = $this->createElement('login');
     $this->getCommand()->appendChild($this->login);
     #
     # This is only the basic command structure.
     # Userid, password, version and language info will be added later by the connection object
     #
     $this->addSessionId();
 }
Ejemplo n.º 16
0
 function __construct($objectname, $addinfo = null, $removeinfo = null, $updateinfo = null)
 {
     parent::__construct();
     if ($objectname instanceof eppHost) {
         $hostname = $objectname->getHostname();
     } else {
         if (strlen($objectname)) {
             $hostname = $objectname;
         } else {
             throw new eppException("Object name must be valid string on eppUpdateHostRequest");
         }
     }
     if ($addinfo instanceof eppHost || $removeinfo instanceof eppHost || $updateinfo instanceof eppHost) {
         $this->updateHost($hostname, $addinfo, $removeinfo, $updateinfo);
     } else {
         throw new eppException('addinfo, removeinfo and updateinfo need to be eppDomain, eppContact or eppHost objects');
     }
     $this->addSessionId();
 }
Ejemplo n.º 17
0
 function __construct($objectname, $addinfo = null, $removeinfo = null, $updateinfo = null)
 {
     parent::__construct();
     if ($objectname instanceof eppContactHandle) {
         $contacthandle = $objectname->getContactHandle();
     } else {
         if (strlen($objectname)) {
             $contacthandle = $objectname;
         } else {
             throw new eppException("Object name must be valid string on eppUpdateContactRequest");
         }
     }
     if ($addinfo instanceof eppContact || $removeinfo instanceof eppContact || $updateinfo instanceof eppContact) {
         $this->updateContact($contacthandle, $addinfo, $removeinfo, $updateinfo);
     } else {
         throw new eppException('addinfo, removeinfo and updateinfo needs to be eppContact object on eppUpdateContactRequest');
     }
     $this->addSessionId();
 }
Ejemplo n.º 18
0
 function __construct($objectname, $addinfo = null, $removeinfo = null, $updateinfo = null, $forcehostattr = false)
 {
     parent::__construct();
     $this->setForcehostattr($forcehostattr);
     if ($objectname instanceof eppDomain) {
         $domainname = $objectname->getDomainName();
     } else {
         if (strlen($objectname)) {
             $domainname = $objectname;
         } else {
             throw new eppException("Object name must be valid string on eppUpdateDomainRequest");
         }
     }
     if ($addinfo instanceof eppDomain || $removeinfo instanceof eppDomain || $updateinfo instanceof eppDomain) {
         $this->updateDomain($domainname, $addinfo, $removeinfo, $updateinfo);
     } else {
         throw new eppException('addinfo, removeinfo and updateinfo needs to be eppDomain object on eppUpdateDomainRequest');
     }
     $this->addSessionId();
 }
 function __construct(eppRequest $request, $sudoUser)
 {
     $this->originalRequest = $request;
     parent::__construct();
     $ext = $this->createElement('extension');
     $extSudo = $this->createElement('ext:sudo');
     $ext->appendChild($extSudo);
     parent::getEpp()->appendChild($ext);
     $clID = $this->createElement('ext:clID');
     $clID->nodeValue = $sudoUser;
     $extSudo->appendChild($clID);
     $command = $request->getElementsByTagName('command');
     if ($command->length > 0) {
         $extCommand = $this->createElement('ext:command');
         $extSudo->appendChild($extCommand);
         foreach ($command as $child) {
             $node = $this->importNode($child, true);
             $extCommand->appendChild($node->firstChild);
             break;
         }
         $extension = $this->createElement('extension');
         $extensions = $request->getElementsByTagName('extension');
         if ($extensions->length > 0) {
             foreach ($extensions as $child) {
                 $node = $this->importNode($child, true);
                 $extension->appendChild($node->firstChild);
                 break;
             }
             $extCommand->appendChild($extension);
         }
     } else {
         $extCommand = $this->createElement('ext:extCommand');
         $extSudo->appendChild($extCommand);
         $command = $request->getElementsByTagName('ext:command');
         foreach ($command as $child) {
             $node = $this->importNode($child, true);
             $extCommand->appendChild($node->firstChild);
             break;
         }
     }
 }
Ejemplo n.º 20
0
 function __construct($polltype, $messageid = null, $services = null, $extensions = null)
 {
     parent::__construct();
     #
     # sanity checks
     #
     if ($polltype != self::POLL_REQ && $polltype != self::POLL_ACK) {
         throw new eppException('Polltype needs to be REQ or ACK on poll request');
     }
     if ($polltype == self::POLL_ACK && !strlen($messageid)) {
         throw new eppException('Messageid needs to be filled on poll ACK request');
     }
     switch ($polltype) {
         case self::POLL_REQ:
             $this->setRequest($polltype, $messageid);
             break;
         case self::POLL_ACK:
             $this->setRequest($polltype, $messageid);
             break;
     }
     $this->addSessionId();
 }
Ejemplo n.º 21
0
 function __construct($objectname, $addinfo = null, $removeinfo = null, $updateinfo = null)
 {
     parent::__construct();
 }
Ejemplo n.º 22
0
 function __construct()
 {
     parent::__construct();
     $this->getEpp()->appendChild($this->createElement('hello'));
 }
 function __construct($operation, $object)
 {
     parent::__construct();
     #
     # Sanity checks
     #
     switch ($operation) {
         case self::OPERATION_QUERY:
             if ($object instanceof eppDomain) {
                 if (!strlen($object->getDomainname())) {
                     throw new eppException('Domain object does not contain a valid domain name on eppTransferRequest');
                 }
                 $this->setDomainQuery($object);
             } elseif ($object instanceof eppContactHandle) {
                 $this->setContactQuery($object);
             }
             break;
         case self::OPERATION_REQUEST:
             if ($object instanceof eppDomain) {
                 if (!strlen($object->getDomainname())) {
                     throw new eppException('Domain object does not contain a valid domain name on eppTransferRequest');
                 }
                 $this->setDomainRequest($object);
             } elseif ($object instanceof eppContactHandle) {
                 $this->setContactQuery($object);
             }
             break;
         case self::OPERATION_CANCEL:
             if ($object instanceof eppDomain) {
                 if (!strlen($object->getDomainname())) {
                     throw new eppException('Domain object does not contain a valid domain name on eppTransferRequest');
                 }
                 $this->setDomainCancel($object);
             } elseif ($object instanceof eppContactHandle) {
                 throw new eppException('CANCEL operation not possible on contact transfer query');
             }
             break;
         case self::OPERATION_APPROVE:
             if ($object instanceof eppDomain) {
                 if (!strlen($object->getDomainname())) {
                     throw new eppException('Domain object does not contain a valid domain name on eppTransferRequest');
                 }
                 $this->setDomainApprove($object);
             } elseif ($object instanceof eppContactHandle) {
                 throw new eppException('APPROVE operation not possible on contact transfer query');
             }
             break;
         case self::OPERATION_REJECT:
             if ($object instanceof eppDomain) {
                 if (!strlen($object->getDomainname())) {
                     throw new eppException('Domain object does not contain a valid domain name on eppTransferRequest');
                 }
                 $this->setDomainReject($object);
             } elseif ($object instanceof eppContactHandle) {
                 throw new eppException('REJECT operation not possible on contact transfer query');
             }
             break;
         default:
             throw new eppException('Operation parameter needs to be QUERY, REQUEST, CANCEL, APPROVE or REJECT on eppTransferRequest');
             break;
     }
     $this->addSessionId();
 }