本文整理汇总了PHP中BFCHelper::getState方法的典型用法代码示例。如果您正苦于以下问题:PHP BFCHelper::getState方法的具体用法?PHP BFCHelper::getState怎么用?PHP BFCHelper::getState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BFCHelper
的用法示例。
在下文中一共展示了BFCHelper::getState方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMerchantOfferFromService
public function getMerchantOfferFromService($language = null)
{
$params = $this->getState('params');
$offerId = $params['offerId'];
if ($language == null) {
$language = BFCHelper::getState('merchantdetails', 'language');
}
$options = array('path' => $this->urlMerchantOffer, 'data' => array('id' => $offerId, 'cultureCode' => BFCHelper::getQuotedString($language), '$format' => 'json'));
$url = $this->helper->getQuery($options);
$offer = null;
$r = $this->helper->executeQuery($url);
if (isset($r)) {
$res = json_decode($r);
// $offer = $res->d->results ?: $res->d;
if (!empty($res->d->GetVariationPlanById)) {
$offer = $res->d->GetVariationPlanById;
} elseif (!empty($res->d)) {
$offer = $res->d;
}
}
return $offer;
}
示例2: uniqid
$cLanguageList = BFCHelper::parseArrayList(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEW_CONSTANTS_LANGUAGESLIST'));
$cCCTypeList = BFCHelper::parseArrayList(JTEXT::_('COM_BOOKINGFORCONNECTOR_DEFAULT_FORM_CCTYPELIST'));
$nation = "";
$culture = "";
$checkinId = uniqid('checkin');
$checkoutId = uniqid('checkout');
$checkin = new DateTime();
$minyear = date("y");
$maxyear = $minyear + 5;
$checkout = new DateTime();
$checkout->modify('+1 day');
$formRoute = "index.php?option=com_bookingforconnector&task=sendOrder";
$privacy = BFCHelper::GetPrivacy($this->language);
$additionalPurpose = BFCHelper::GetAdditionalPurpose($this->language);
$policy = BFCHelper::GetPolicy($resource->ResourceId, $this->language);
$stayrequest = htmlspecialchars(json_encode(BFCHelper::getState('stayrequest', 'resource')), ENT_COMPAT, 'UTF-8');
$staysuggested = '';
$stay = null;
$completestay = $this->stay;
if (!empty($completestay->SuggestedStay)) {
$stay = $completestay->SuggestedStay;
}
$selVariationId = $this->selVariationId;
$totalWithVariation = $this->totalWithVariation;
$selVariation = $this->selVariation;
$deposit = 0;
if (!empty($stay)) {
$currstay = $stay;
$currstay->DiscountedPrice = $totalWithVariation;
$currstay->RatePlanStay = $completestay;
unset($currstay->RatePlanStay->SuggestedStay);
示例3: getMerchantRatingsFromService
public function getMerchantRatingsFromService($start, $limit, $merchantId = null, $language = '')
{
$params = $this->getState('params');
if ($merchantId == null) {
$merchantId = $params['merchantId'];
}
if ($language == null) {
$language = BFCHelper::getState('merchantdetails', 'language');
}
$options = array('path' => $this->urlMerchantRating, 'data' => array('cultureCode' => BFCHelper::getQuotedString($language), '$format' => 'json'));
if (isset($start) && $start > 0) {
$options['data']['skip'] = $start;
}
if (isset($limit) && $limit > 0) {
$options['data']['top'] = $limit;
}
if (isset($merchantId) && $merchantId > 0) {
$options['data']['MerchantId'] = $merchantId;
}
$filters = $params['filters'];
// typologyid filtering
if ($filters != null && $filters['typologyid'] != null && $filters['typologyid'] != "0") {
// $options['data']['$filter'] .= ' and TypologyId eq ' .$filters['typologyid'];
$options['data']['tipologyId'] = $filters['typologyid'];
}
$url = $this->helper->getQuery($options);
$ratings = null;
$r = $this->helper->executeQuery($url);
if (isset($r)) {
$res = json_decode($r);
// $ratings = $res->d->results ?: $res->d;
if (!empty($res->d->results)) {
$ratings = $res->d->results;
} elseif (!empty($res->d)) {
$ratings = $res->d;
}
}
return $ratings;
}