当前位置: 首页>>代码示例>>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;未经允许,请勿转载。