本文整理匯總了PHP中client::getName方法的典型用法代碼示例。如果您正苦於以下問題:PHP client::getName方法的具體用法?PHP client::getName怎麽用?PHP client::getName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類client
的用法示例。
在下文中一共展示了client::getName方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: client
function test_getName()
{
//Arrange
$name = "Tony awesome";
$stylist_id = 1;
$id = 1;
$visits = 3;
$description = "Smells bad";
$test_client = new client($name, $stylist_id, $id, $visits, $description);
//Act
$result = $test_client->getName();
//Assert
$this->assertEquals($name, $result);
}
示例2: client
include "client.php";
session_start();
$user = $_SESSION["id"];
$date = $_SESSION["date"];
$class = $_SESSION["class"];
$var = 0;
if (!isset($_SESSION['schedule']) && empty($_SESSION['schedule'])) {
$_SESSION["schedule"] = $_GET['schedule'];
}
if (!isset($_SESSION['station']) && empty($_SESSION['station'])) {
$_SESSION["station"] = $_GET['name'];
}
$station = $_SESSION['station'];
$schedule = $_SESSION['schedule'];
$client = new client();
$clientName = $client->getName($user);
if ($client->exists($clientName)) {
echo "<table style=\"border:1px solid black; border-collapse:collapse;\" width=\"1350\" height=\"100\"> ";
echo "<th width=\"200\" bgcolor=\"#0000FF\">Customer Details</th>";
$client->details($clientName);
if (isset($_POST['submit'])) {
$_SESSION["seats"] = $_POST['seat'];
$var = $_SESSION["seats"];
echo "Number of tickets : " . $var . "</br>";
$cost = $client->CheckBooking($schedule, $class, $var);
}
if (isset($_POST['sub'])) {
$client->makeBooking($schedule, $class, $_SESSION["seats"], $date, $user);
header('Location: CustomerDet.php');
}
}