本文整理汇总了PHP中Country::getCode方法的典型用法代码示例。如果您正苦于以下问题:PHP Country::getCode方法的具体用法?PHP Country::getCode怎么用?PHP Country::getCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Country
的用法示例。
在下文中一共展示了Country::getCode方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: toArray
/**
* Returns an array with data indexed by name.
*
* @return array
*/
public function toArray()
{
$adminLevels = [];
foreach ($this->adminLevels as $adminLevel) {
$adminLevels[$adminLevel->getLevel()] = ['name' => $adminLevel->getName(), 'code' => $adminLevel->getCode()];
}
return array('latitude' => $this->getLatitude(), 'longitude' => $this->getLongitude(), 'bounds' => $this->bounds->toArray(), 'kind' => $this->kind, 'streetNumber' => $this->streetNumber, 'streetName' => $this->streetName, 'postalCode' => $this->postalCode, 'locality' => $this->locality, 'subLocality' => $this->subLocality, 'adminLevels' => $adminLevels, 'country' => $this->country->getName(), 'countryCode' => $this->country->getCode(), 'timezone' => $this->timezone);
}
示例2: getByCountry
/**
* Get a prefix for a given country.
* @param Country $country
* @return PhonePrefix
* @throws Unknown if the given country has no dedicated phone prefix.
*/
static function getByCountry(Country $country)
{
$code = $country->getCode();
$prefix = false;
foreach (self::$prefixes as $candidate => $countries) {
if (in_array($code, $countries)) {
$prefix = $candidate;
break;
}
}
if ($prefix) {
return new PhonePrefix($prefix);
} else {
throw new Unknown();
}
}
示例3: setLocale
/**
* Locale of pages displayed by PayPal during Express Checkout.
* Character length and limitations: Any two-character country code.
* The following two-character country codes are supported by PayPal:
* * AU - Australia
* * AT - Austria
* * BE - Belgium
* * CA - Canada
* * CH - Switzerland
* * CN - China
* * DE - Germany
* * ES - Spain
* * GB - United Kingdom
* * FR - France
* * IT - Italy
* * NL - Netherlands
* * PL - Poland
* * US - United States
* Any other value will default to US.
*
* @param Country $country
*/
public function setLocale(Country $country)
{
$this->collection->setValue('LOCALECODE', $country->getCode());
}
示例4: putGS
<TD ALIGN="RIGHT" valign="top"><?php putGS("Country"); ?>:</TD>
<TD>
<?php
$names = array();
foreach ($countryTranslations as $translation) {
$names[] = htmlspecialchars($translation->getName());
}
echo implode(", ", $names);
?>
<TR>
<TD ALIGN="RIGHT" ><?php putGS("Name"); ?>:</TD>
<TD>
<INPUT TYPE="TEXT" class="input_text" NAME="f_country_name" SIZE="32" VALUE="<?php p(htmlspecialchars($country->getName())); ?>">
</TD>
</TR>
<TR>
<TD COLSPAN="2">
<DIV ALIGN="CENTER">
<INPUT TYPE="HIDDEN" NAME="f_country_code" VALUE="<?php print $country->getCode(); ?>">
<INPUT TYPE="HIDDEN" NAME="f_country_language" VALUE="<?php print $country->getLanguageId(); ?>">
<INPUT TYPE="submit" class="button" NAME="OK" VALUE="<?php putGS('Save'); ?>">
<!--<INPUT TYPE="button" class="button" NAME="Cancel" VALUE="<?php putGS('Cancel'); ?>" ONCLICK="location.href='/admin/country/'">-->
</DIV>
</TD>
</TR>
</TABLE>
</FORM>
<P>
<?php camp_html_copyright_notice(); ?>
示例5: p
p($ADMIN);
?>
/pub/editdeftime.php?Pub=<?php
p($Pub);
?>
&CountryCode=<?php
p($time->getCountryCode());
?>
&Language=<?php
p($Language);
?>
"><?php
p(htmlspecialchars($country->getName()));
?>
(<?php
p(htmlspecialchars($country->getCode()));
?>
)</A>
</TD>
<TD ALIGN="center">
<?php
p(htmlspecialchars($time->getTrialTime()));
?>
</TD>
<TD ALIGN="center">
<?php
p(htmlspecialchars($time->getPaidTime()));
?>
</TD>
<TD ALIGN="CENTER">
<A HREF="/<?php
示例6: putGS
<TD ALIGN="LEFT" VALIGN="TOP" rowspan="2"><B><?php putGS("Country<BR><SMALL>(click to edit)</SMALL>"); ?></B></TD>
<td colspan="2"><?php putGS('Default time period'); ?> (<?php p($pubTimeUnit->getName()); ?>):</td>
<TD ALIGN="LEFT" VALIGN="TOP" rowspan="2"><B><?php putGS("Delete"); ?></B></TD>
</TR>
<tr class="table_list_header">
<TD ALIGN="LEFT" VALIGN="TOP" nowrap><B><?php putGS("trial subscription"); ?></B></TD>
<TD ALIGN="LEFT" VALIGN="TOP" nowrap><B><?php putGS("paid subscription"); ?></B></TD>
</tr>
<?php
$color = 0;
foreach ($defaultTimes as $time) {
$country = new Country($time->getCountryCode(), $Language);
?>
<TR <?php if ($color) { $color=0; ?>class="list_row_even"<?php } else { $color=1; ?>class="list_row_odd"<?php } ?>>
<TD>
<A HREF="/<?php p($ADMIN); ?>/pub/editdeftime.php?Pub=<?php p($Pub); ?>&CountryCode=<?php p($time->getCountryCode()); ?>&Language=<?php p($Language); ?>"><?php p(htmlspecialchars($country->getName())); ?> (<?php p(htmlspecialchars($country->getCode())); ?>)</A>
</TD>
<TD ALIGN="center">
<?php p(htmlspecialchars($time->getTrialTime())); ?>
</TD>
<TD ALIGN="center">
<?php p(htmlspecialchars($time->getPaidTime())); ?>
</TD>
<TD ALIGN="CENTER">
<A HREF="/<?php p($ADMIN); ?>/pub/do_deldeftime.php?Pub=<?php p($Pub); ?>&CountryCode=<?php p($time->getCountryCode()); ?>&Language=<?php p($Language); ?>&<?php echo SecurityToken::URLParameter(); ?>" onclick="return confirm('<?php putGS('Are you sure you want to delete the subscription settings for $1?', """.htmlspecialchars($publicationObj->getName()).':'.htmlspecialchars($time->getCountryCode())."""); ?>');"><IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/delete.png" BORDER="0" ALT="<?php putGS('Delete'); ?>" TITLE="<?php putGS('Delete'); ?>" ></A>
</TD>
</TR>
<?php
}
?> <TR><TD COLSPAN="2" NOWRAP>
</TABLE>
示例7: erase
function erase(Country $country)
{
$parametros = array();
$parametros['Code'] = $country->getCode();
return $this->bd->delete($this->tabla, $parametros);
}
示例8:
<TD ALIGN="RIGHT" ><?php
putGS("Name");
?>
:</TD>
<TD>
<INPUT TYPE="TEXT" class="input_text" NAME="f_country_name" SIZE="32" VALUE="<?php
p(htmlspecialchars($country->getName()));
?>
">
</TD>
</TR>
<TR>
<TD COLSPAN="2">
<DIV ALIGN="CENTER">
<INPUT TYPE="HIDDEN" NAME="f_country_code" VALUE="<?php
print $country->getCode();
?>
">
<INPUT TYPE="HIDDEN" NAME="f_country_language" VALUE="<?php
print $country->getLanguageId();
?>
">
<INPUT TYPE="submit" class="button" NAME="OK" VALUE="<?php
putGS('Save');
?>
">
<!--<INPUT TYPE="button" class="button" NAME="Cancel" VALUE="<?php
putGS('Cancel');
?>
" ONCLICK="location.href='/admin/country/'">-->
</DIV>
示例9: array
include_once($GLOBALS['g_campsiteDir']."/$ADMIN_DIR/javascript_common.php");
$crumbs = array(getGS("Subscriptions") => "deftime.php?Pub=$Pub&Language=$Language");
camp_html_content_top(getGS("Change country subscription settings"), array("Pub" => $publicationObj), true, false, $crumbs);
?>
<P>
<FORM NAME="subscription_settings" METHOD="POST" ACTION="do_editdeftime.php" onsubmit="return <?php camp_html_fvalidate(); ?>;">
<?php echo SecurityToken::FormParameter(); ?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" CLASS="box_table">
<INPUT TYPE="HIDDEN" NAME="Pub" VALUE="<?php p($Pub); ?>">
<INPUT TYPE="HIDDEN" NAME="CountryCode" VALUE="<?php p($CountryCode); ?>">
<INPUT TYPE="HIDDEN" NAME="Language" VALUE="<?php p($Language); ?>">
<TR>
<TD ALIGN="center" colspan="2">
<b><?php putGS("Country"); ?>: <?php p(htmlspecialchars($country->getName()." (".$country->getCode().")")); ?></b>
</TD>
</TR>
<tr>
<td colspan="2" align="left"><?php putGS('Default time periods:'); ?></td>
</tr>
<TR>
<TD ALIGN="RIGHT" >- <?php putGS("trial subscription"); ?>:</TD>
<TD>
<INPUT TYPE="TEXT" NAME="cTrialTime" VALUE="<?php p($defaultTime->getTrialTime()); ?>" SIZE="5" MAXLENGTH="5" class="input_text" alt="number|0|1|100000" emsg="<?php putGS("You must input a number greater than 0 into the $1 field.", """.getGS("trial subscription")."""); ?>">
<?php p($pubTimeUnit->getName()); ?>
</TD>
</TR>
<TR>
<TD ALIGN="RIGHT" >- <?php putGS("paid subscription"); ?>:</TD>
<TD>
示例10:
">
<INPUT TYPE="HIDDEN" NAME="CountryCode" VALUE="<?php
p($CountryCode);
?>
">
<INPUT TYPE="HIDDEN" NAME="Language" VALUE="<?php
p($Language);
?>
">
<TR>
<TD ALIGN="center" colspan="2">
<b><?php
putGS("Country");
?>
: <?php
p(htmlspecialchars($country->getName() . " (" . $country->getCode() . ")"));
?>
</b>
</TD>
</TR>
<tr>
<td colspan="2" align="left"><?php
putGS('Default time periods:');
?>
</td>
</tr>
<TR>
<TD ALIGN="RIGHT" >- <?php
putGS("trial subscription");
?>
:</TD>