本文整理汇总了PHP中Countries::getCodebyId方法的典型用法代码示例。如果您正苦于以下问题:PHP Countries::getCodebyId方法的具体用法?PHP Countries::getCodebyId怎么用?PHP Countries::getCodebyId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Countries
的用法示例。
在下文中一共展示了Countries::getCodebyId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createNic
/**
*
* @param integer $domainId
* @param string $type
*/
private function createNic($domainId, $type = 'owner')
{
$soap = $this->Connect();
if (!empty($this->session)) {
$tld = Domains::getDomainTld($domainId);
// get the domain profile
$profile = DomainsProfiles::getProfileByDomainId($domainId, $type);
if ($profile) {
// Set generic variables for parameters
$profile['countrycode'] = strtolower(Countries::getCodebyId($profile['country_id']));
$profile['birthdate'] = Shineisp_Commons_Utilities::formatDateOut($profile['birthdate']);
$profile['password'] = Shineisp_Commons_Utilities::GenerateRandomString();
$profile['fullname'] = $profile['firstname'] . " " . $profile['lastname'];
$profile['legalform'] = strtolower($profile['Legalforms']['name']);
$profile['corporationtype'] = strtolower($profile['CompanyTypes']['name']);
$profile['legalnumber'] = null;
$profile['language'] = "en";
$profile['isowner'] = $type == "owner" ? true : false;
if ($tld == "it") {
// Create a nicHandle for the Italian domain tld
$params[] = $this->session['id'];
// Session
$params[] = $profile['lastname'];
// Lastname
$params[] = $profile['firstname'];
// Firstname
$params[] = $profile['gender'];
// Gender
$params[] = $profile['password'];
// Password
$params[] = $profile['email'];
// Email
$params[] = $profile['phone'];
// Phone
$params[] = $profile['fax'];
// Fax
$params[] = $profile['address'];
// Address
$params[] = $profile['city'];
// City
$params[] = $profile['area'];
// Area
$params[] = $profile['zip'];
// Zip
$params[] = $profile['countrycode'];
// Country Code
$params[] = $profile['language'];
// Language
$params[] = $profile['isowner'];
// isOwner
$params[] = $profile['legalform'];
// Legalform
$params[] = $profile['company'];
// Organisation
$params[] = $profile['fullname'];
// Legal name
$params[] = $profile['legalnumber'];
// Legal Number
$params[] = $profile['vat'];
// VAT or IVA
$params[] = $profile['birthdate'];
// Birthday
$params[] = $profile['birthplace'];
// Birthcity
$params[] = $profile['taxpayernumber'];
// Contact fiscal code or company vat
$params[] = $profile['vat'];
// Company National Identification Number
$params[] = $profile['corporationtype'];
$nicHandle = call_user_func_array(array($soap, 'nicCreateIT'), $params);
Shineisp_Commons_Utilities::log('Calling profile nicCreateIT with these params: ' . json_encode($params), "registrar.ovh.log");
} else {
$params[] = $this->session['id'];
// Session
$params[] = $profile['lastname'];
// Lastname
$params[] = $profile['firstname'];
// Firstname
$params[] = $profile['password'];
// Password
$params[] = $profile['email'];
// Email
$params[] = $profile['phone'];
// Phone
$params[] = $profile['fax'];
// Fax
$params[] = $profile['address'];
// Address
$params[] = $profile['city'];
// City
$params[] = $profile['area'];
// Area
$params[] = $profile['zip'];
// Zip
$params[] = $profile['countrycode'];
//.........这里部分代码省略.........