當前位置: 首頁>>代碼示例>>PHP>>正文


PHP parent::convertDataObject方法代碼示例

本文整理匯總了PHP中parent::convertDataObject方法的典型用法代碼示例。如果您正苦於以下問題:PHP parent::convertDataObject方法的具體用法?PHP parent::convertDataObject怎麽用?PHP parent::convertDataObject使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在parent的用法示例。


在下文中一共展示了parent::convertDataObject方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: convertDataObject

 public function convertDataObject($dataObject, $newStructure = null)
 {
     $p = new parent();
     if (is_null($newStructure)) {
         $newStructure = $this->newStructure;
     }
     $newDataObject = $p->convertDataObject($dataObject, $newStructure);
     // run customizations required by this particular class
     // set custom nameservers to nameserver_list
     if (isset($dataObject->data)) {
         if ($dataObject->data->custom_nameservers == 1) {
             $newDataObject->attributes->nameserver_list = array();
             for ($j = 1; $j <= 10; ++$j) {
                 $tns = 'name' . $j;
                 $tso = 'sortorder' . $j;
                 if (isset($dataObject->data->{$tns}) && $dataObject->data->{$tns} != '' && isset($dataObject->data->{$tso}) && $dataObject->data->{$tso}) {
                     $nameserver = new \stdClass();
                     $nameserver->name = $dataObject->data->{$tns};
                     $nameserver->sortorder = $dataObject->data->{$tso};
                     $newDataObject->attributes->nameserver_list[] = $nameserver;
                 }
             }
         }
     }
     if (isset($dataObject->personal)) {
         $newDataObject->attributes->contact_set = new \stdClass();
         $newDataObject->attributes->contact_set->owner = $dataObject->personal;
         $newDataObject->attributes->contact_set->admin = $dataObject->personal;
         $newDataObject->attributes->contact_set->billing = $dataObject->personal;
         $newDataObject->attributes->contact_set->tech = $dataObject->personal;
     }
     // end customizations
     return $newDataObject;
 }
開發者ID:opensrs,項目名稱:osrs-toolkit-php,代碼行數:34,代碼來源:SWRegister.php

示例2: convertDataObject

 public function convertDataObject($dataObject, $newStructure = null)
 {
     $p = new parent();
     if (is_null($newStructure)) {
         $newStructure = $this->newStructure;
     }
     $newDataObject = $p->convertDataObject($dataObject, $newStructure);
     $tlds = array();
     if (isset($dataObject->data->selected) && $dataObject->data->selected) {
         $tlds = explode(';', $dataObject->data->selected);
     }
     if (empty($tlds) && isset($dataObject->data->defaulttld) && $dataObject->data->defaulttld) {
         $tlds = explode(';', $dataObject->data->defaulttld);
     }
     if (empty($tlds)) {
         $tlds = $this->defaultTlds;
     }
     /*
      * setting service_override
      */
     $newDataObject->attributes->service_override = new \stdClass();
     $service_override = new \stdCLass();
     $service_override->tlds = $tlds;
     if (isset($dataObject->data->maximum) && $dataObject->data->maximum) {
         $service_override->maximum = $dataObject->data->maximum;
     }
     $newDataObject->attributes->service_override->suggestion = $service_override;
     $newDataObject->attributes->services = array('suggestion');
     /* end setting service_override **/
     return $newDataObject;
 }
開發者ID:opensrs,項目名稱:osrs-toolkit-php,代碼行數:31,代碼來源:SuggestDomain.php

示例3: convertDataObject

 public function convertDataObject($dataObject, $newStructure = null)
 {
     $p = new parent();
     if (is_null($newStructure)) {
         $newStructure = $this->newStructure;
     }
     $newDataObject = $p->convertDataObject($dataObject, $newStructure);
     // run customizations required by this particular class
     // set custom nameservers to nameserver_list
     if (isset($dataObject->data->nameserver_names) && $dataObject->data->nameserver_names != '') {
         $nameServers = explode(',', $dataObject->data->nameserver_names);
         if (isset($dataObject->data->nameserver_ips) && $dataObject->data->nameserver_ips != '') {
             $ipAddresses = explode(',', $dataObject->data->nameserver_ips);
         } else {
             $ipAddresses = array();
         }
         $i = 0;
         $newDataObject->attributes->nameserver_list = array();
         for ($i = 0; $i < count($nameServers); ++$i) {
             $nameserver_obj = new \stdClass();
             $nameserver_obj->fqdn = $nameServers[$i];
             if (isset($ipAddresses[$i])) {
                 $nameserver_obj->fqdn = $ipAddresses[$i];
             }
         }
     }
     // end customizations
     return $newDataObject;
 }
開發者ID:opensrs,項目名稱:osrs-toolkit-php,代碼行數:29,代碼來源:ProvisioningUpdateAllInfo.php

示例4: convertDataObject

 public function convertDataObject($dataObject, $newStructure = null)
 {
     $p = new parent();
     if (is_null($newStructure)) {
         $newStructure = $this->newStructure;
     }
     $newDataObject = $p->convertDataObject($dataObject, $newStructure);
     return $newDataObject;
 }
開發者ID:opensrs,項目名稱:osrs-toolkit-php,代碼行數:9,代碼來源:ProvisioningRenew.php

示例5: convertDataObject

 public function convertDataObject($dataObject, $newStructure = null)
 {
     $p = new parent();
     if (is_null($newStructure)) {
         $newStructure = $this->newStructure;
     }
     $newDataObject = $p->convertDataObject($dataObject, $newStructure);
     $newDataObject->attributes->add_to_all_registry = explode(',', $newDataObject->attributes->add_to_all_registry);
     return $newDataObject;
 }
開發者ID:opensrs,項目名稱:osrs-toolkit-php,代碼行數:10,代碼來源:NameserverCreate.php

示例6: convertDataObject

 public function convertDataObject($dataObject, $newStructure = null)
 {
     $p = new parent();
     if (is_null($newStructure)) {
         $newStructure = $this->newStructure;
     }
     $newDataObject = $p->convertDataObject($dataObject, $newStructure);
     if (!is_array($newDataObject->attributes->change_items)) {
         $newDataObject->attributes->change_items = explode(',', $newDataObject->attributes->change_items);
     }
     return $newDataObject;
 }
開發者ID:opensrs,項目名稱:osrs-toolkit-php,代碼行數:12,代碼來源:BulkSubmit.php

示例7: convertDataObject

 public function convertDataObject($dataObject, $newStructure = null)
 {
     $p = new parent();
     if (is_null($newStructure)) {
         $newStructure = $this->newStructure;
     }
     $newDataObject = $p->convertDataObject($dataObject, $newStructure);
     // make sure attributes->reg_domain is set, even if it's
     // an empty string
     if (!isset($newDataObject->attributes->reg_domain)) {
         $newDataObject->attributes->reg_domain = '';
     }
     return $newDataObject;
 }
開發者ID:opensrs,項目名稱:osrs-toolkit-php,代碼行數:14,代碼來源:AuthenticationChangeOwnership.php

示例8: convertDataObject

 public function convertDataObject($dataObject, $newStructure = null)
 {
     $p = new parent();
     if (is_null($newStructure)) {
         $newStructure = $this->newStructure;
     }
     $newDataObject = $p->convertDataObject($dataObject, $newStructure);
     // run old 'getTlds' method (now called 'getServiceOverride') to get
     // info that should be part of service override entries
     $newDataObject->attributes->service_override = $this->getServiceOverride($dataObject);
     $newDataObject->attributes->services = array('lookup', 'suggestion');
     /* end setting service_override **/
     return $newDataObject;
 }
開發者ID:opensrs,項目名稱:osrs-toolkit-php,代碼行數:14,代碼來源:NameSuggest.php

示例9: convertDataObject

 public function convertDataObject($dataObject, $newStructure = null)
 {
     $p = new parent();
     if (is_null($newStructure)) {
         $newStructure = $this->newStructure;
     }
     $newDataObject = $p->convertDataObject($dataObject, $newStructure);
     // set attributes->domain_list
     if (!is_object($newDataObject->attributes)) {
         $newDataObject->attributes = new \stdClass();
     }
     $newDataObject->attributes->domain_list = explode(',', $dataObject->data->domain_list);
     return $newDataObject;
 }
開發者ID:opensrs,項目名稱:osrs-toolkit-php,代碼行數:14,代碼來源:GetDomainsContacts.php

示例10: convertDataObject

 public function convertDataObject($dataObject, $newStructure = null)
 {
     $p = new parent();
     if (is_null($newStructure)) {
         $newStructure = $this->newStructure;
     }
     $newDataObject = $p->convertDataObject($dataObject, $newStructure);
     // run customizations required by this particular class
     // make sure attributes->types is an array on the new
     // object
     if (!is_array($newDataObject->attributes->types)) {
         $newDataObject->attributes->types = explode(',', $newDataObject->attributes->types);
     }
     // end customizations
     return $newDataObject;
 }
開發者ID:opensrs,項目名稱:osrs-toolkit-php,代碼行數:16,代碼來源:ProvisioningUpdateContacts.php

示例11: convertDataObject

 public function convertDataObject($dataObject, $newStructure = null)
 {
     $p = new parent();
     if (is_null($newStructure)) {
         $newStructure = $this->newStructure;
     }
     $newDataObject = $p->convertDataObject($dataObject, $newStructure);
     // run customizations required by this particular class
     if (isset($newDataObject->contact_set) && isset($dataObject->personal)) {
         $newDataObject->contact_set = new \stdClass();
         $contact_types = explode(',', $dataObject->data->contact_type);
         foreach ($contact_types as $contact_type) {
             $newDataObject->contact_set->{$contact_type} = $dataObject->personal;
         }
     }
     // end customizations
     return $newDataObject;
 }
開發者ID:opensrs,項目名稱:osrs-toolkit-php,代碼行數:18,代碼來源:ProvisioningModify.php

示例12: convertDataObject

 public function convertDataObject($dataObject, $newStructure = null)
 {
     $p = new parent();
     if (is_null($newStructure)) {
         $newStructure = $this->newStructure;
     }
     $newDataObject = $p->convertDataObject($dataObject, $newStructure);
     /*
      * Convert fields that should be arrays to arrays
      */
     if (isset($newDataObject->attributes->add_ns)) {
         $newDataObject->attributes->add_ns = explode(',', $newDataObject->attributes->add_ns);
     }
     if (isset($newDataObject->attributes->assign_ns)) {
         $newDataObject->attributes->assign_ns = explode(',', $newDataObject->attributes->assign_ns);
     }
     if (isset($newDataObject->attributes->remove_ns)) {
         $newDataObject->attributes->remove_ns = explode(',', $newDataObject->attributes->remove_ns);
     }
     return $newDataObject;
 }
開發者ID:opensrs,項目名稱:osrs-toolkit-php,代碼行數:21,代碼來源:NameserverAdvancedUpdate.php

示例13: convertDataObject

 public function convertDataObject($dataObject, $newStructure = null)
 {
     $p = new parent();
     if (is_null($newStructure)) {
         $newStructure = $this->newStructure;
     }
     $newDataObject = $p->convertDataObject($dataObject, $newStructure);
     // explode change_items into an array
     // if it isn't already
     if (!is_array($newDataObject->attributes->change_items)) {
         $newDataObject->attributes->change_items = explode(',', $newDataObject->attributes->change_items);
     }
     // build attributes->contacts array.
     // data->type is the contact_type,
     // data->personal is the contact record
     if (isset($dataObject->data->type) && $dataObject->data->type != '' && isset($dataObject->personal) && $dataObject->personal != '') {
         $newDataObject->attributes->contacts = array();
         $contact_types = explode(',', $dataObject->data->type);
         foreach ($contact_types as $i => $contact_type) {
             $contact = new \stdClass();
             $contact->set = $dataObject->personal;
             $contact->type = $contact_type;
             $newDataObject->attributes->contacts[] = $contact;
             unset($contact);
         }
     }
     // explode *_ns fields into arrays if they exist
     // and are not already arrays
     if (isset($newDataObject->attributes->add_ns) && !is_array($newDataObject->attributes->add_ns)) {
         $newDataObject->attributes->add_ns = explode(',', $newDataObject->attributes->add_ns);
     }
     if (isset($newDataObject->attributes->remove_ns) && !is_array($newDataObject->attributes->remove_ns)) {
         $newDataObject->attributes->remove_ns = explode(',', $newDataObject->attributes->remove_ns);
     }
     if (isset($newDataObject->attributes->assign_ns) && !is_array($newDataObject->attributes->assign_ns)) {
         $newDataObject->attributes->assign_ns = explode(',', $newDataObject->attributes->assign_ns);
     }
     return $newDataObject;
 }
開發者ID:opensrs,項目名稱:osrs-toolkit-php,代碼行數:39,代碼來源:BulkChange.php


注:本文中的parent::convertDataObject方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。