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


PHP Restaurant::getRestaurantName方法代碼示例

本文整理匯總了PHP中Restaurant::getRestaurantName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Restaurant::getRestaurantName方法的具體用法?PHP Restaurant::getRestaurantName怎麽用?PHP Restaurant::getRestaurantName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Restaurant的用法示例。


在下文中一共展示了Restaurant::getRestaurantName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Restaurant

 function test_getRestaurantName()
 {
     //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->getRestaurantName();
     //Assert
     $this->assertEquals($restaurant_name, $result);
 }
開發者ID:alexdbrown,項目名稱:best_restaurant,代碼行數:15,代碼來源:RestaurantTest.php

示例2: catch

            $restaurant->City = $_POST['city'];
            $restaurant->Street = $_POST['street'];
            $restaurant->StreetNumber = $_POST['number'];
            $restaurant->PhoneNumber = $_POST['phonenumber'];
            $restaurant->PostalCode = $_POST['postcode'];
            $restaurant->OwnerId = $_SESSION['ownerid'];
            $restaurant->insert();
        } catch (Exception $e) {
            $feedback = $e->getMessage();
            echo $feedback;
        }
    }
}
if (isset($_POST['btnProceed'])) {
    $_SESSION['restaurantId'] = $_POST['selectrestaurant'];
    $restaurantName = $restaurant->getRestaurantName($_POST['selectrestaurant']);
    $_SESSION['restaurantName'] = $restaurantName;
    if ($_SESSION['loggedin']) {
        header("Location: dashboard.php");
        exit;
    }
}
?>


<html lang="en">
 <head>
 	<meta charset="UTF-8">
 	<title>Restorapp</title>
 	<link rel="stylesheet" href="css/reset.css">
 	<link rel="stylesheet" href="css/screen.css">
開發者ID:sactel,項目名稱:PHPprojectRestaurant,代碼行數:31,代碼來源:kiesrestaurant.php

示例3: testUpdate

 function testUpdate()
 {
     //Arrange
     $restaurant_name = "Joes Burgers";
     $id = null;
     $test_restaurant = new Restaurant($restaurant_name, $id);
     $test_restaurant->save();
     $new_restaurant_name = "McDonalds";
     //Act
     $test_restaurant->update($new_restaurant_name);
     //Assert
     $this->assertEquals($new_restaurant_name, $test_restaurant->getRestaurantName());
 }
開發者ID:kennygrage,項目名稱:epicRestaurant,代碼行數:13,代碼來源:RestaurantTest.php


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