本文整理汇总了PHP中Location::getLocationName方法的典型用法代码示例。如果您正苦于以下问题:PHP Location::getLocationName方法的具体用法?PHP Location::getLocationName怎么用?PHP Location::getLocationName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Location
的用法示例。
在下文中一共展示了Location::getLocationName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Save
public function Save(Location $location)
{
try {
$SQL = self::$INSERT;
if ($location->getSeq() != null && $location->getSeq() != "" && $location->getSeq() > 0) {
$SQL = self::$UPDATE;
}
$conn = self::$db->getConnection();
$stmt = $conn->prepare($SQL);
$stmt->bindValue(':name', $location->getLocationName());
$stmt->bindValue(':locationfolder', $location->getLocationFolder());
$stmt->bindValue(':details', $location->getLocationDetails());
$isPrivate = 0;
if ($location->getIsPrivate() == true || $location->getIsPrivate() == 1) {
$isPrivate = 1;
}
$stmt->bindValue(':hasdirectory', $location->getHasDirectory());
$stmt->bindValue(':isprivate', $isPrivate);
if ($SQL == self::$UPDATE) {
$stmt->bindValue(':locationSeq', $location->getSeq());
}
$stmt->execute();
$error = $stmt->errorInfo();
if ($error[2] != "") {
throw new Exception($error[2]);
}
} catch (Exception $e) {
$logger = Logger::getLogger($ConstantsArray["logger"]);
$logger->error("Error During Save Location : - " . $e->getMessage());
}
//I will be put code here for throw exception and show on the screen
}
示例2:
<td class="ui-widget-content">
<form name="frm1" method="post" action="CreateLocation.php">
<input type="hidden" name="seq" id="seq" value="<?php
echo $location->getSeq();
?>
" />
<input type="hidden" name="folderName" id="folderName" value="<?php
echo $location->getLocationFolder();
?>
" />
<table width="100%" border="0" style="padding:10px 10px 10px 10px;">
<tr>
<td width="22%">Location Name :</td>
<td width="40%"><input name="location" type="text" size="50" value="<?php
echo $location->getLocationName();
?>
" >
</td><td><span style="color:#FF0000; margin-bottom:15px;" >*</span></td>
</tr>
<tr>
<td>Location Details :</td>
<td><textarea name="details" id="details" cols="38" rows="4" ><?php
echo $location->getLocationDetails();
?>
</textarea>
</td>
</tr>
<tr>
<td>Create Directory</td>
<?php
示例3: equals
public function equals(Location $location)
{
return $this->getLocationName() == $location->getLocationName();
}
示例4: update
public function update(Location $loc)
{
$query = "UPDATE `location` SET `location_name`='" . $loc->getLocationName() . "',`location_city`='" . $loc->getLocationCity() . "',`longitude`='" . $loc->getLongitude() . "',`latitude`='" . $loc->getLatitude() . "',`altitude`='" . $loc->getAltitude() . "' WHERE `idlocation`='" . $loc->getLocationId() . "'";
$this->con->openConnection();
$this->con->executeRawQuery($query);
$this->con->closeConnection();
}