本文整理匯總了PHP中Place::getAddress方法的典型用法代碼示例。如果您正苦於以下問題:PHP Place::getAddress方法的具體用法?PHP Place::getAddress怎麽用?PHP Place::getAddress使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Place
的用法示例。
在下文中一共展示了Place::getAddress方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: insertPlace
public function insertPlace(Place $place)
{
$cn = new Conexao();
$sql = "INSERT INTO places_added (name, description, address, lat, lng, phone, type, site, facebook_page, plus_page, photo) VALUES ('" . $place->getName() . "','" . $place->getDescription() . "','" . $place->getAddress() . "','" . $place->getLat() . "','" . $place->getLng() . "','" . $place->getPhone() . "','" . $place->getType() . "','" . $place->getSite() . "','" . $place->getFacebookPage() . "','" . $place->getPlusPage() . "','" . $place->getPhoto() . "')";
$result = $cn->execute($sql);
$id = $cn->returnInsertedId();
$cn->disconnect();
if ($result != false) {
return true;
} else {
return false;
}
}
示例2: testSetGetAddress
public function testSetGetAddress()
{
$this->object->setAddress("Address");
$this->assertEquals("Address", $this->object->getAddress());
}
示例3: testUpdateAddress
function testUpdateAddress()
{
//Arrange
$place_name = "Director Park";
$address = "SW Park Ave";
$latitude = 45.518672;
$longitude = -122.681211;
$id = 1;
$test_place = new Place($place_name, $address, $latitude, $longitude, $id);
$test_place->save();
$new_address = "NW West Ave";
//Act
$test_place->updateAddress($new_address);
//Assert
$this->assertEquals($test_place->getAddress(), $new_address);
}