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


PHP Country::getName方法代码示例

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


在下文中一共展示了Country::getName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: getCountry

 /**
  * Returns the name of the country of the registered user.
  *
  * @return string
  */
 protected function getCountry()
 {
     $countryCode = $this->m_dbObject->getProperty('CountryCode');
     $smartyObj = CampTemplate::singleton();
     $contextObj = $smartyObj->get_template_vars('gimme');
     $country = new Country($countryCode, $contextObj->language->number);
     if (!$country->exists()) {
         return null;
     }
     return $country->getName();
 }
开发者ID:nistormihai,项目名称:Newscoop,代码行数:16,代码来源:MetaUser.php

示例3: putGS

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

示例4: camp_html_breadcrumbs

	$correct = false;
	$errorMsgs[] = getGS("You must fill in the $1 field.", "<B>".getGS("Name")."</B>");
}

if (!$language->exists()) {
    $correct = false;
    $errorMsgs[] = getGS('You must select a language.');
}

if ($correct) {
	$newCountry = new Country($f_country_code, $f_country_new_language);
	$created = $newCountry->create(array('Name' => $f_country_name));
	if ($created) {
	    camp_html_goto_page("/$ADMIN/country/");
	} else {
		$errorMsgs[] = getGS('The country name $1 could not be translated','<B>'.$country->getName().'</B>');
	}
}

$crumbs = array();
$crumbs[] = array(getGS("Configure"), "");
$crumbs[] = array(getGS("Countries"), "/$ADMIN/country/");
$crumbs[] = array(getGS("Adding new translation"), "");
echo camp_html_breadcrumbs($crumbs);

?>
<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>
	<TD COLSPAN="2">
		<B> <?php  putGS("Adding new translation"); ?> </B>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:do_translate.php

示例5: testGetSetName

 public function testGetSetName()
 {
     $this->country->setName('GREAT BRITAIN');
     $this->assertEquals('GREAT BRITAIN', $this->country->getName());
 }
开发者ID:delboy1978uk,项目名称:country,代码行数:5,代码来源:CountryTest.php

示例6: p

>
		<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()));
    ?>
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:deftime.php

示例7: 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

示例8: camp_html_breadcrumbs

echo camp_html_breadcrumbs($crumbs);

?>

<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>
	<TD COLSPAN="2">
		<B> <?php  putGS("Delete country"); ?> </B>
		<HR NOSHADE SIZE="1" COLOR="BLACK">
	</TD>
</TR>
<TR>
	<TD COLSPAN="2">
	<BLOCKQUOTE>
	<LI><?php  putGS('The country $1 could not be deleted.' ,'<B>'.htmlspecialchars($country->getName()).'('.htmlspecialchars($language->getNativeName()).')</B>'); ?></LI>
	</BLOCKQUOTE>
	</TD>
</TR>
<TR>
	<TD COLSPAN="2">
	<DIV ALIGN="CENTER">
	<INPUT TYPE="button" class="button" NAME="OK" VALUE="<?php  putGS('OK'); ?>" ONCLICK="location.href='/<?php p($ADMIN); ?>/country/'">
	</DIV>
	</TD>
</TR>
</TABLE>
<P>

<?php camp_html_copyright_notice(); ?>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:30,代码来源:do_del.php

示例9: getCountry

 /**
  * Get the name of the country of the registered user
  *
  * @return string
  */
 protected function getCountry()
 {
     require_once dirname(__FILE__) . '/../../classes/Country.php';
     require_once dirname(__FILE__) . '/../../classes/Language.php';
     $countryCode = $this->m_dbObject->getAttribute('country_code');
     $smartyObj = CampTemplate::singleton();
     $contextObj = $smartyObj->get_template_vars('gimme');
     $country = new Country($countryCode, $contextObj->language->number);
     return !$country->exists() ? '' : $country->getName();
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:15,代码来源:MetaUser.php

示例10: 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

示例11: testName

 /**
  * @dataProvider getNames
  */
 public function testName($in, $out)
 {
     $this->assertSame($this->entity, $this->entity->setName($in));
     $this->assertSame($out, $this->entity->getName());
 }
开发者ID:jlm-entreprise,项目名称:daily-bundle,代码行数:8,代码来源:PartFamilyTest.php

示例12: camp_html_breadcrumbs

$created = false;
if (empty($f_country_name)) {
    $correct = false;
    $errorMsgs[] = $translator->trans("You must fill in the \$1 field.", array('$1' => "<B>" . $translator->trans("Name") . "</B>"));
}
if (!$language->exists()) {
    $correct = false;
    $errorMsgs[] = $translator->trans('You must select a language.');
}
if ($correct) {
    $newCountry = new Country($f_country_code, $f_country_new_language);
    $created = $newCountry->create(array('Name' => $f_country_name));
    if ($created) {
        camp_html_goto_page("/{$ADMIN}/country/");
    } else {
        $errorMsgs[] = $translator->trans('The country name $1 could not be translated', array('$1' => '<B>' . $country->getName() . '</B>'), 'country');
    }
}
$crumbs = array();
$crumbs[] = array($translator->trans("Configure"), "");
$crumbs[] = array($translator->trans("Countries"), "/{$ADMIN}/country/");
$crumbs[] = array($translator->trans("Adding new translation"), "");
echo camp_html_breadcrumbs($crumbs);
?>
<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>
	<TD COLSPAN="2">
		<B> <?php 
echo $translator->trans("Adding new translation");
?>
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:do_translate.php

示例13: Country

            <div class="row">
                <div class="box col-md-12">
                    <div class="box-inner">
                        <div class="box-header well" data-original-title="">
                            <h2><i class="glyphicon glyphicon-edit"></i>Add/Edit Country</h2>


                        </div>
                        <div class="box-content">
                            <?php 
$id = Request::get("id");
if (is_numeric($id) && $id > 0) {
    $countryObj = new Country();
    $countryObj->set("country_id", $id);
    $result = $countryObj->getName();
    if (count($result)) {
        $row = $result[0];
        $country_id = $row['id'];
        $country_name = $row['name'];
        $country_status = $row['active'];
    }
}
?>
                            <form action="" method="POST" name="country_frm" id="country_frm">
                                <table class="table table-striped table-bordered bootstrap-datatable datatable responsive">
                                    <tr>
                                        <td><label class="control-label" for="selectError">Country</label></td>
                                        <td><div class="input-group" >
                                                <span class="input-group-addon"></span>
                                                <input type="text" name="country_name"  value="<?php 
开发者ID:sonaljain888,项目名称:legal-lawyer1,代码行数:30,代码来源:add_country.php

示例14:

">
<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

示例15: camp_html_breadcrumbs

if (!$g_user->hasPermission('ManageCountries')) {
    camp_html_display_error($translator->trans("You do not have the right to change country names.", array(), 'country'));
    exit;
}
$f_country_code = Input::Get('f_country_code');
$f_country_language = Input::Get('f_country_language');
$f_country_name = trim(Input::Get('f_country_name'));
$country = new Country($f_country_code, $f_country_language);
$language = new Language($f_country_language);
if (empty($f_country_name)) {
    $errorMsgs[] = $translator->trans("You must fill in the \$1 field.", array('$1' => "<B>" . $translator->trans("Name") . "</B>"));
} else {
    if ($country->setName($f_country_name)) {
        camp_html_goto_page("/{$ADMIN}/country/index.php");
    } else {
        $errorMsgs[] = $translator->trans('The country name $1 could not be changed', array('$1' => '<B>' . htmlspecialchars($country->getName()) . '</B>'), 'country');
    }
}
$crumbs = array();
$crumbs[] = array($translator->trans("Configure"), "");
$crumbs[] = array($translator->trans("Countries"), "/{$ADMIN}/country/");
$crumbs[] = array($translator->trans("Changing country name", array(), 'country'), "");
echo camp_html_breadcrumbs($crumbs);
?>

<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>
	<TD COLSPAN="2">
		<B> <?php 
echo $translator->trans("Changing country name", array(), 'country');
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:do_edit.php


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