本文整理汇总了PHP中State::getShortName方法的典型用法代码示例。如果您正苦于以下问题:PHP State::getShortName方法的具体用法?PHP State::getShortName怎么用?PHP State::getShortName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类State
的用法示例。
在下文中一共展示了State::getShortName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayData
function displayData()
{
$cityTemp = CityManager::getSingleCity('id', $this->church->getIdCity());
if ($cityTemp === NULL) {
$cityTemp = new City();
}
$stateTemp = CityManager::getSingleState('id', $cityTemp->getIdState());
$cityString = "*************************";
if ($stateTemp === NULL) {
$stateTemp = new State();
} else {
$cityString = $cityTemp->getName() . ", " . $stateTemp->getShortName();
}
$this->SetFont('Arial', 'B', 10);
$cellSizeY = 5;
for ($i = 0; $i < 3; $i++) {
//Get the data necesary of create the document
$this->SetXY($x + 100, $i * 60 + $y + 40 - $cellSizeY);
$this->Cell(80, $cellSizeY, iconv('utf-8', 'cp1252', $this->church->getName()), 0, 0, 'C');
$this->SetXY($x + 100, $i * 60 + $y + 47 - $cellSizeY);
$this->Cell(80, $cellSizeY, iconv('utf-8', 'cp1252', $this->church->getAddress()), 0, 0, 'C');
$this->SetXY($x + 100, $i * 60 + $y + 54 - $cellSizeY);
$this->Cell(80, $cellSizeY, iconv('utf-8', 'cp1252', 'CP. ' . $this->church->getPostalCode()), 0, 0, 'C');
$this->SetXY($x + 100, $i * 60 + $y + 61 - $cellSizeY);
$this->Cell(80, $cellSizeY, iconv('utf-8', 'cp1252', $cityString), 0, 0, 'C');
}
}
示例2: addState
/**
* insert one state in the database
*
* @author Jonathan Sandoval <jonathan_s_pisis@yahoo.com.mx>
* @param State $state The state to insert
* @return boolean If was possible to insert
*/
static function addState($state = null)
{
if ($state === null) {
return false;
}
$shortName = $state->getShortName();
$singleState = self::getSingleState('shortName', $shortName);
if (self::compareState($singleState, $state) === false) {
$tableState = DatabaseManager::getNameTable('TABLE_STATE');
$name = $state->getName();
$country = $state->getCountry();
$query = "INSERT INTO {$tableState}\n (shortName, name, country)\n VALUES \n ('{$shortName}', '{$name}', '{$country}')";
return DatabaseManager::singleAffectedRow($query);
} else {
return false;
}
}