本文整理汇总了PHP中Library\Utility\Helper::getCurrency方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper::getCurrency方法的具体用法?PHP Helper::getCurrency怎么用?PHP Helper::getCurrency使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Library\Utility\Helper
的用法示例。
在下文中一共展示了Helper::getCurrency方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testBookingProcess
/**
* Test booking process
*/
public function testBookingProcess()
{
$bookingTicketService = $this->getApplicationServiceLocator()->get('service_booking_booking_ticket');
$channelManagerService = $this->getApplicationServiceLocator()->get('service_channel_manager');
$apartmentGroupService = $this->getApplicationServiceLocator()->get('service_apartment_group');
$reservationService = $this->getApplicationServiceLocator()->get('service_reservation_main');
$partnerService = $this->getApplicationServiceLocator()->get('service_partners');
$syncService = $this->getApplicationServiceLocator()->get('service_queue_inventory_synchronization_queue');
$currencyService = $this->getApplicationServiceLocator()->get('service_currency_currency');
$this->assertInstanceOf('\\DDD\\Service\\Booking\\BookingTicket', $bookingTicketService);
$this->assertInstanceOf('\\DDD\\Service\\ChannelManager', $channelManagerService);
$this->assertInstanceOf('\\DDD\\Service\\ApartmentGroup', $apartmentGroupService);
$this->assertInstanceOf('\\DDD\\Service\\Reservation\\Main', $reservationService);
$this->assertInstanceOf('\\DDD\\Service\\Partners', $partnerService);
$this->assertInstanceOf('\\DDD\\Service\\Queue\\InventorySynchronizationQueue', $syncService);
$this->assertInstanceOf('\\DDD\\Service\\Currency\\Currency', $currencyService);
// dummy data
$resNumber = $bookingTicketService->generateResNumber();
$timeStamp = date('Y-m-d H:i:s');
$reservationData = ["apartment_id_assigned" => 662, "apartment_id_origin" => 662, "room_id" => 1366, "acc_name" => "Hollywood Al Pacino", "acc_country_id" => 213, "acc_province_id" => 19, "acc_city_id" => 48, "acc_province_name" => "California", "acc_city_name" => "Hollywood Los Angeles", "acc_address" => "1714 N McCadden Pl", "building_name" => $apartmentGroupService->getBuildingName(662), "date_from" => date('Y-m-d'), "date_to" => date('Y-m-d', strtotime(' +1 day')), "currency_rate" => $currencyService->getCurrencyConversionRate(Helper::getCurrency(), "USD"), "currency_rate_usd" => $currencyService->getCurrencyConversionRate('USD', 'USD'), "booker_price" => "249.00", "guest_currency_code" => Helper::getCurrency(), "occupancy" => 2, "res_number" => $resNumber, "timestamp" => $timeStamp, "apartment_currency_code" => 'USD', "rateId" => "3536", "ki_page_status" => BookingTicket::NOT_SEND_KI_PAGE_STATUS, "ki_page_hash" => $bookingTicketService->generatePageHash($resNumber, $timeStamp), "review_page_hash" => $bookingTicketService->generatePageHash($resNumber, 662), "remarks" => "", "guest_first_name" => "Test", "guest_last_name" => "PhpUnit", "guest_email" => "test@ginosi.com", "guest_address" => "Test Street 2", "guest_city_name" => "Yerevan", "guest_country_id" => 2, "guest_language_iso" => 'en', "guest_zip_code" => "12121", "guest_phone" => "37499000000", "partner_ref" => "", "partner_id" => 5, "partner_name" => "Staff", "partner_commission" => 0, "model" => 2];
$customerData['email'] = $reservationData['guest_email'];
$reservationData['customer_data'] = $customerData;
$otherInfo = ['cc_provided' => false, 'availability' => 0, 'no_send_guest_mail' => true, 'ratesData' => $reservationService->getRateDataByRateIdDates($reservationData['rateId'], $reservationData['date_from'], $reservationData['date_to'])];
unset($reservationData['rateId']);
$reservationId = $reservationService->registerReservation($reservationData, $otherInfo, true);
$this->assertLessThan($reservationId, 0, 'Reservation is not correct or not available - [Apartment ID: 662]');
$syncOutput = $syncService->push($reservationData['apartment_id_origin'], $reservationData['date_from'], $reservationData['date_to']);
$this->assertTrue($syncOutput, 'Synchronization Queue is not correct');
}
示例2: getCurrencySite
/**
*
* @return string language
*/
public function getCurrencySite()
{
if ($this->_currency === null) {
$this->_currency = Helper::getCurrency();
}
return $this->_currency;
}
示例3: __invoke
public function __invoke()
{
$currecny = Helper::getCurrency();
return $currecny;
}