当前位置: 首页>>代码示例>>PHP>>正文


PHP Contact::GetRegistryFormattedFieldList方法代码示例

本文整理汇总了PHP中Contact::GetRegistryFormattedFieldList方法的典型用法代码示例。如果您正苦于以下问题:PHP Contact::GetRegistryFormattedFieldList方法的具体用法?PHP Contact::GetRegistryFormattedFieldList怎么用?PHP Contact::GetRegistryFormattedFieldList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Contact的用法示例。


在下文中一共展示了Contact::GetRegistryFormattedFieldList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: PackContact

 private function PackContact(Contact $Contact, $as_type)
 {
     $std_fields = array("FirstName", "LastName", "\r\n\t\t\t\tOrganizationName", "JobTitle", "Address1", "Address2", "City", "StateProvinceChoice", "StateProvince", "PostalCode", "Country", "EmailAddress", "Phone", "Fax");
     $prefix = $this->contact_type_prefix_map[$as_type];
     $data = array();
     foreach ($Contact->GetRegistryFormattedFieldList() as $fname => $fvalue) {
         $k = in_array($fname, $std_fields) ? "{$prefix}{$fname}" : $fname;
         $data[$k] = $fvalue;
     }
     return $data;
 }
开发者ID:rchicoria,项目名称:epp-drs,代码行数:11,代码来源:class.RegistryModule.php

示例2: UpdateContact

		/**
		 * Update contact
		 * @access public
		 * @param string $contact_id Contact registry ID
		 * @param array $contact Contact info.  See XML:config/contacts
		 * @return bool True on success of false on failure
		 */
		public function UpdateContact(Contact $contact)
		{
			$discloses_feature = count($contact->GetConfig()->disclose->children()) > 0;
			
			// First update contact info and disclose@flag=0
			$params = $contact->GetRegistryFormattedFieldList();
			foreach ($params as $k => &$v)
				$v = $this->EscapeXML($v);
			$params['id'] = $contact->CLID;
			$params["pw"] = $this->EscapeXML($contact->AuthCode);
			if ($discloses_feature) 
				$params['disclose'] = $this->GetDiscloseXML($contact->GetDiscloseList(), 0);
				
			$this->BeforeRequest("contact-update", $params, __METHOD__, $contact);
			$response = $this->Request("contact-update", $params);
			
			if ($discloses_feature && $response->Succeed)
			{
				$disclose = $this->GetDiscloseXML($contact->GetDiscloseList(), 1);
				if ($disclose)
				{
					// Update contact disclose@flag=1
					$params = array(
						"id" => $contact->CLID, 
						"disclose" => $disclose 
					);
					$this->BeforeRequest("contact-update-disclose", $params, __METHOD__, $contact);
					$response = $this->Request("contact-update-disclose", $params);
					
				}
			}

			$status = ($response->Succeed) ? REGISTRY_RESPONSE_STATUS::SUCCESS : REGISTRY_RESPONSE_STATUS::FAILED;			
			return new UpdateContactResponse($status, $response->ErrMsg, $response->Code);
		}		
开发者ID:rchicoria,项目名称:epp-drs,代码行数:42,代码来源:class.GenericEPPRegistryModule.php

示例3: UpdateContact

 /**
  * This method request registry to update contact
  * 
  * @param Contact $contact
  * @return UpdateContactResponse
  */
 public function UpdateContact(Contact $contact)
 {
     $params = array('id' => $contact->CLID);
     $params = array_merge($params, $contact->GetRegistryFormattedFieldList());
     foreach ($params as &$param) {
         if (!is_array($param)) {
             $param = $this->EscapeXML($param);
         }
     }
     $params['disclose_add'] = $this->GetDisclosesXML($contact->GetDiscloseList());
     // TODO add disclose rem
     $params['disclose_rem'] = '';
     if ($this->IsRegistrant($contact)) {
         $response = $this->Request("contact-update-holder", $params);
     } else {
         $response = $this->Request("contact-update", $params);
     }
     $status = $response->Succeed ? REGISTRY_RESPONSE_STATUS::SUCCESS : REGISTRY_RESPONSE_STATUS::FAILED;
     $ret = new UpdateContactResponse($status, $response->ErrMsg, $response->Code);
     $ret->Result = $status != REGISTRY_RESPONSE_STATUS::FAILED;
     return $ret;
 }
开发者ID:rchicoria,项目名称:epp-drs,代码行数:28,代码来源:class.RegistryModule.php

示例4: MapContactToPerson

 private function MapContactToPerson(Contact $contact)
 {
     $fields = $contact->GetRegistryFormattedFieldList();
     $type_fkey = $this->Db->GetOne("\r\n\t\t\t\tSELECT type_key \r\n\t\t\t\tFROM whois_type \r\n\t\t\t\tWHERE UPPER(whois_type.`type`) = UPPER(?)", array($contact->GroupName));
     //throw new Exception($contact->GroupName);
     //throw new Exception("type key: " . $type_fkey);
     $country_fkey = $this->Db->GetOne("\r\n\t\t\t\tSELECT country_key \r\n\t\t\t\tFROM whois_country \r\n\t\t\t\tWHERE short = ?", array($fields['cc']));
     return array('type_fkey' => $type_fkey, 'name' => $fields['name'], 'country_fkey' => $country_fkey, 'city' => $fields['city'], 'pcode' => $fields['pc'], 'address' => $fields['street'], 'phone' => $fields['voice'], 'fax' => $fields['fax'], 'email' => $fields['email']);
 }
开发者ID:rchicoria,项目名称:epp-drs,代码行数:9,代码来源:class.RegistryModule.php


注:本文中的Contact::GetRegistryFormattedFieldList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。