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


PHP State::getShortName方法代码示例

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

示例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;
     }
 }
开发者ID:jonatalamantes,项目名称:NotariusAdOmnes,代码行数:24,代码来源:CityManager.php


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