상속: extends Exception
 public function _validateObject($dataObject, $requiredFields = null)
 {
     if (empty($dataObject->cookie) && empty($dataObject->attributes->domain)) {
         Exception::notDefined('cookie and/or domain.');
     }
     $parent = new parent();
     $parent->_validateObject($dataObject, $this->requiredFields);
 }
 public function _validateObject($dataObject, $requiredFields = null)
 {
     if (!isset($dataObject->attributes->order_id) and !isset($dataObject->attributes->product_id)) {
         Exception::notDefined('order_id or product_id');
     }
     $parent = new parent();
     $parent->_validateObject($dataObject, $this->requiredFields);
 }
예제 #3
0
 public function loadChangeTypeClass($change_type)
 {
     $changeTypeClassName = $this->getFriendlyClassName($change_type);
     $changeTypeClass = "\\opensrs\\domains\\bulkchange\\changetype\\{$changeTypeClassName}";
     if (class_exists($changeTypeClass)) {
         return new $changeTypeClass();
     } else {
         Exception::classNotFound($changeTypeClass);
     }
 }
 public function _validateObject($dataObject, $requiredFields = null)
 {
     if ((!isset($dataObject->cookie) || $dataObject->cookie == '') && (!isset($dataObject->attributes->domain) || $dataObject->attributes->domain == '')) {
         Exception::notDefined('cookie or domain');
     }
     if (isset($dataObject->cookie) && $dataObject->cookie != '' && isset($dataObject->attributes->domain) && $dataObject->attributes->domain != '') {
         Exception::cannotSetOneCall('cookie and domain');
     }
     $parent = new parent();
     $parent->_validateObject($dataObject, $this->requiredFields);
 }
 private function checkContactFields($contact)
 {
     // Check Contact information
     $contact_types = array('owner_contact', 'admin_contact', 'tech_contact', 'billing_contact');
     for ($contact_type = 0; $contact_type < count($contact_types); ++$contact_type) {
         if (!isset($contact->{$contact_types[$contact_type]})) {
             Exception::notDefined($contact_types[$contact_type]);
         }
         for ($i = 0; $i < count($this->contactRequiredFields); ++$i) {
             if (!isset($contact->{$contact_types[$contact_type]}->{$this->contactRequiredFields[$i]}) || $contact->{$contact_types[$contact_type]}->{$this->contactRequiredFields[$i]} == '') {
                 Exception::notDefined("{$this->contactRequiredFields[$i]} in {$contact_types[$contact_type]} ");
             }
         }
     }
 }
예제 #6
0
 private function _validateObject($dataObject)
 {
     $domain = '';
     // search domain must be definded
     if (!isset($dataObject->data->domain)) {
         Exception::notDefined('domain');
     }
     // Grab domain name
     $domain = $dataObject->data->domain;
     if (!isset($dataObject->data->selected)) {
         Exception::notDefined('selected');
     }
     if (!isset($dataObject->data->alldomains)) {
         Exception::notDefined('alldomains');
     }
     $selected = explode(';', $dataObject->data->selected);
     $this->tlds = explode(';', $dataObject->data->alldomains);
     if (count(array_filter($selected)) >= 1) {
         $this->tlds = $selected;
     }
 }