本文整理汇总了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);
}