本文整理汇总了PHP中Place::generateLocation方法的典型用法代码示例。如果您正苦于以下问题:PHP Place::generateLocation方法的具体用法?PHP Place::generateLocation怎么用?PHP Place::generateLocation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Place
的用法示例。
在下文中一共展示了Place::generateLocation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_generateLocation
function test_generateLocation()
{
$place_name = "Bombay Chaat House";
$address = "804 SW Yamhill St";
$latitude = 43.51983;
$longitude = -122.68437;
$id = 1;
$test_place = new Place($place_name, $address, $latitude, $longitude, $id);
$test_place->save();
$place_name2 = "Nordstrom Downtown Portland";
$address2 = "701 SW Broadway";
$latitude2 = 45.519229;
$longitude2 = -122.680314;
$id2 = 2;
$test_place2 = new Place($place_name2, $address2, $latitude2, $longitude2, $id2);
$test_place2->save();
$place_name3 = "Banana Republic";
$address3 = "710 SW Yamhill St";
$latitude3 = 45.518594;
$longitude3 = -122.680357;
$id3 = 3;
$test_place3 = new Place($place_name3, $address3, $latitude3, $longitude3, $id3);
$test_place3->save();
$result = Place::generateLocation();
$this->assertEquals(true, is_object($result));
}
示例2: setMeetupLocation
static function setMeetupLocation($user1, $user2)
{
$temp_location = Place::generateLocation();
if ($temp_location->verifyLocation($user1, $user2)) {
return $temp_location;
} else {
Place::setMeetupLocation($user1, $user2);
}
}