本文整理汇总了PHP中Restaurant::getAddress方法的典型用法代码示例。如果您正苦于以下问题:PHP Restaurant::getAddress方法的具体用法?PHP Restaurant::getAddress怎么用?PHP Restaurant::getAddress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Restaurant
的用法示例。
在下文中一共展示了Restaurant::getAddress方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Restaurant
function test_getAddress()
{
//Arrange
$restaurant_name = "VQ";
$phone = '5032277342';
$address = "1220 SW 1st Ave, Portland, OR 97204";
$website = "http://www.veritablequandary.com/";
$cuisine_id = 1;
$id = null;
$test_restaurant = new Restaurant($restaurant_name, $phone, $address, $website, $cuisine_id, $id);
//Act
$result = $test_restaurant->getAddress();
//Assert
$this->assertEquals($address, $result);
}
示例2:
echo $cuisine->getName();
?>
</a><?php
}
?>
</span>
<h2 class="post-title"><a href="#"><?php
echo $restaurant->getName();
?>
<span class="plus"><span>+</span> </span></a></h2>
<!--BEGIN .post-content -->
<div class="post-content">
<p><?php
echo $restaurant->getAddress();
?>
</p>
<!--END .post-content -->
</div>
<a class="read-more" href="#">Read More<span class="plus"><span>+</span> </span></a>
<span class="meta-published">306 days ago</span>
<!--END .hentry-->
</div>
</div>
<?php
}
getNavNextPage();
include 'template/footer.php';
示例3: Cuisine
function test_getAddress()
{
$type = "Thai";
$id = null;
$test_Cuisine = new Cuisine($type, $id);
$test_Cuisine->save();
$name = "Pok Pok";
$phone = "555-456-2345";
$address = "123 abcd street";
$website = "http://www.helloworld.com";
$cuisine_id = $test_Cuisine->getId();
$test_Restaurant = new Restaurant($name, $id, $phone, $address, $website, $cuisine_id);
$result = $test_Restaurant->getAddress();
$this->assertEquals($address, $result);
}
示例4: Recommendation
include "inc/includes.php";
require_once "inc/Restaurant.php";
require_once "inc/Cuisine.php";
require_once "inc/Filter.php";
global $USER_LOGGED_IN;
global $USERID;
// Generate the default recommendations if user is logged in.
if ($USER_LOGGED_IN) {
$recommendation = new Recommendation($USERID);
$filter = new Filter();
$filter->setCuisine(7);
$result = $recommendation->getFilteredWithCategory(2, $filter);
while ($reco = mysql_fetch_array($result)) {
$restaurant = new Restaurant($reco['resId']);
echo $restaurant->getName() . "," . $restaurant->getAddress();
$cuisines = $restaurant->getCategories();
foreach ($cuisines as $cuisine) {
echo $cuisine->getName();
}
}
}
?>
<html>
<body>
<?php
getFacebookWidget();
?>
</body>
</html>
示例5: Cuisine
function test_update()
{
$name = "Chinese";
$id = null;
$test_cuisine = new Cuisine($name, $id);
$test_cuisine->save();
$place_name = "Happy House";
$address = "4234 N Interstate Ave, Portland OR 97217";
$phone = "503-287-9740";
$cuisine_id = $test_cuisine->getId();
$test_restaurant = new Restaurant($place_name, $id, $address, $phone, $cuisine_id);
$test_restaurant->save();
$new_place_name = "Very Happy House";
$new_address = "5000 N Interstate Ave, Portland OR 97217";
$new_phone = "503-287-9000";
$test_restaurant->update($new_place_name, $new_address, $new_phone);
$this->assertEquals("Very Happy House", $test_restaurant->getPlaceName());
$this->assertEquals("5000 N Interstate Ave, Portland OR 97217", $test_restaurant->getAddress());
$this->assertEquals("503-287-9000", $test_restaurant->getPhone());
}