当前位置: 首页>>代码示例>>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;未经允许,请勿转载。