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


PHP Country::getCode方法代码示例

本文整理汇总了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);
 }
开发者ID:corpsepk,项目名称:Geocoder,代码行数:13,代码来源:Address.php

示例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();
     }
 }
开发者ID:janoszen,项目名称:i18n,代码行数:22,代码来源:PhonePrefix.php

示例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());
 }
开发者ID:rdeeb,项目名称:paypal,代码行数:26,代码来源:SetExpressCheckout.php

示例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(); ?>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:30,代码来源:edit.php

示例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 
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:deftime.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?', "&quot;".htmlspecialchars($publicationObj->getName()).':'.htmlspecialchars($time->getCountryCode())."&quot;"); ?>');"><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>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:deftime.php

示例7: erase

 function erase(Country $country)
 {
     $parametros = array();
     $parametros['Code'] = $country->getCode();
     return $this->bd->delete($this->tabla, $parametros);
 }
开发者ID:ealvarez1990,项目名称:ludoteca,代码行数:6,代码来源:ManageCountry.php

示例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>
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:edit.php

示例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.", "&quot;".getGS("trial subscription")."&quot;"); ?>">
	<?php p($pubTimeUnit->getName()); ?>
	</TD>
</TR>
<TR>
	<TD ALIGN="RIGHT" >- <?php  putGS("paid subscription"); ?>:</TD>
	<TD>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:editdeftime.php

示例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>
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:editdeftime.php


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