当前位置: 首页>>代码示例>>PHP>>正文


PHP Customer::getEmail方法代码示例

本文整理汇总了PHP中Customer::getEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP Customer::getEmail方法的具体用法?PHP Customer::getEmail怎么用?PHP Customer::getEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Customer的用法示例。


在下文中一共展示了Customer::getEmail方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: gettersShouldRetrieveConfiguredData

 /**
  * @test
  */
 public function gettersShouldRetrieveConfiguredData()
 {
     $phone = new Phone(11, 999999999);
     $address = new Address('aa', 'aa', '2123', 'aa', 'asdad', 12312);
     $customer = new Customer('aa@test.com', 'aa', $phone, $address);
     $this->assertEquals('aa@test.com', $customer->getEmail());
     $this->assertEquals('aa', $customer->getName());
     $this->assertSame($phone, $customer->getPhone());
     $this->assertSame($address, $customer->getAddress());
 }
开发者ID:leonardorifeli,项目名称:pagseguro,代码行数:13,代码来源:CustomerTest.php

示例2: updateForm

 public function updateForm(Customer $customerToUpdate)
 {
     $this->name = $customerToUpdate->getName();
     $this->surname = $customerToUpdate->getSurname();
     $this->telephone = $customerToUpdate->getTelephone();
     $this->email = $customerToUpdate->getEmail();
     $form = $this->renderHTMLForCustomerForm('update');
     // Set page title
     $this->pageTitle = 'Update customer';
     // Set HTML
     $this->HTML = $form;
 }
开发者ID:aa222di,项目名称:toeswade-organizer,代码行数:12,代码来源:VCustomer.php

示例3: runPage

 protected function runPage()
 {
     if (WebRequest::wasPosted()) {
         if (!WebRequest::postInt("calroom")) {
             $this->showCal();
             return;
         }
         $startdate = new DateTime(WebRequest::post("qbCheckin"));
         $enddate = new DateTime(WebRequest::post("qbCheckout"));
         $room = Room::getById(WebRequest::postInt("calroom"));
         for ($date = $startdate; $date < $enddate; $date->modify("+1 day")) {
             if (!$room->isAvailable($date)) {
                 $this->error("room-not-available");
                 $this->showCal();
                 return;
             }
         }
         // search for customer
         if (!($customer = Customer::getByEmail(WebRequest::post("qbEmail")))) {
             $customer = new Customer();
             $suTitle = WebRequest::post("qbTitle");
             $suFirstname = WebRequest::post("qbFirstname");
             $suLastname = WebRequest::post("qbLastname");
             $suAddress = WebRequest::post("qbAddress");
             $suCity = WebRequest::post("qbCity");
             $suPostcode = WebRequest::post("qbPostcode");
             $suCountry = WebRequest::post("qbCountry");
             $suEmail = WebRequest::post("qbEmail");
             $customer->setPassword($suEmail);
             // set values
             $customer->setTitle($suTitle);
             $customer->setFirstname($suFirstname);
             $customer->setSurname($suLastname);
             $address = new Address();
             $address->setLine1($suAddress);
             $address->setCity($suCity);
             $address->setPostCode($suPostcode);
             $address->setCountry($suCountry);
             $address->save();
             $customer->setAddress($address);
             $customer->setEmail($suEmail);
             // save it
             $customer->save();
             $customer->sendMailConfirm();
             // save it again
             $customer->save();
         }
         $booking = new Booking();
         $booking->setStartDate(WebRequest::post("qbCheckin"));
         $booking->setEndDate(WebRequest::post("qbCheckout"));
         $booking->setAdults(WebRequest::post("qbAdults"));
         $booking->setChildren(WebRequest::post("qbChildren"));
         $booking->setPromocode(WebRequest::post("qbPromoCode"));
         $booking->setRoom($room->getId());
         $booking->setCustomer($customer->getId());
         $booking->save();
         $msg = Message::getMessage("booking-confirmation");
         $msg = str_replace("\$1", $booking->getStartDate(), $msg);
         $msg = str_replace("\$2", $booking->getEndDate(), $msg);
         $msg = str_replace("\$3", $booking->getAdults(), $msg);
         $msg = str_replace("\$4", $booking->getChildren(), $msg);
         $msg = str_replace("\$5", $booking->getRoom()->getName(), $msg);
         Mail::send($customer->getEmail(), Message::getMessage("booking-confimation-subject"), $msg);
         $this->mSmarty->assign("content", $msg);
         return;
     }
     throw new YouShouldntBeDoingThatException();
 }
开发者ID:vulnerabilityCode,项目名称:hotel-system,代码行数:68,代码来源:PageCalendar.php

示例4: updateDatabase

 private function updateDatabase(Customer $customerToUpdate)
 {
     $stmt = $this->db->db->prepare("UPDATE " . self::$dbTable . " SET `name`= :name, `surname`= :surname, `telephone`= :telephone, `email`= :email WHERE `id`=:id");
     $name = $customerToUpdate->getName();
     $surname = $customerToUpdate->getSurname();
     $telephone = $customerToUpdate->getTelephone();
     $email = $customerToUpdate->getEmail();
     $id = $customerToUpdate->getId();
     $stmt->bindParam(':name', $name);
     $stmt->bindParam(':surname', $surname);
     $stmt->bindParam(':telephone', $telephone);
     $stmt->bindParam(':email', $email);
     $stmt->bindParam(':id', $id);
     try {
         $stmt->execute();
     } catch (\PDOException $e) {
         print "Error!: " . $e->getMessage();
         die;
         //Remove or change message in production code
     }
 }
开发者ID:aa222di,项目名称:toeswade-organizer,代码行数:21,代码来源:CustomerCatalogue.php

示例5: testSetEmailWorks

 public function testSetEmailWorks()
 {
     $customer = new Customer();
     $customer->setEmail('luis.nh@gmail.com');
     $this->assertEquals('luis.nh@gmail.com', $customer->getEmail());
 }
开发者ID:hilltool,项目名称:tray-php,代码行数:6,代码来源:CustomerTest.php

示例6: header

             $daysList['Friday'] = 'Friday';
         }
         if (isset($_POST["chkSaturday"])) {
             $daysList['Saturday'] = 'Saturday';
         }
         if (isset($_POST["chkSunday"])) {
             $daysList['Sunday'] = 'Sunday';
         }
         $sDate = $_POST["txtStartDate"];
         $fDate = $_POST["txtFinalDate"];
         $response = $customer->editStandingOrder($idorder, $idcustomer, $date, $reference, $note, $items, $sDate, $fDate, $daysList);
     } else {
         $response = $customer->editOrder($idorder, $idcustomer, $date, $reference, $note, $items);
     }
     if ($response != "false") {
         if ($customer->getEmail($idcustomer) != "") {
             $_GET["idCustomerOrder"] = $idorder;
             include "../view/customerOrderPrint.php";
         }
         $msg = "All changes were successfully saved";
         header("Location: ../view/customerOrderAdd.php?edit=true&idCustomerOrder={$idorder}&msg={$msg}");
     } else {
         header("Location: ../view/customerOrderAdd.php?msg=Couldn't edit the customer order");
     }
     break;
 case "deleteOrder":
     $customer = new Customer();
     $idorder = $_GET["idcustomer_order"];
     $result = $customer->deleteOrder($idorder);
     if ($result == "ok") {
         header("Location: ../view/customerOrders.php");
开发者ID:Edgargm87,项目名称:efapcom,代码行数:31,代码来源:CustomerController.php


注:本文中的Customer::getEmail方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。