當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Place::getAddress方法代碼示例

本文整理匯總了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;
     }
 }
開發者ID:sbvb,項目名稱:BestPlacesWS,代碼行數:13,代碼來源:ServiceDAO.php

示例2: testSetGetAddress

 public function testSetGetAddress()
 {
     $this->object->setAddress("Address");
     $this->assertEquals("Address", $this->object->getAddress());
 }
開發者ID:EHER,項目名稱:chegamos,代碼行數:5,代碼來源:PlaceTest.php

示例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);
 }
開發者ID:juliocesardiaz,項目名稱:Face2Face,代碼行數:16,代碼來源:PlaceTest.php


注:本文中的Place::getAddress方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。