本文整理汇总了PHP中BFCHelper::getQuotedString方法的典型用法代码示例。如果您正苦于以下问题:PHP BFCHelper::getQuotedString方法的具体用法?PHP BFCHelper::getQuotedString怎么用?PHP BFCHelper::getQuotedString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BFCHelper
的用法示例。
在下文中一共展示了BFCHelper::getQuotedString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setAlertOnSell
public function setAlertOnSell($customerData = NULL, $searchData = NULL, $merchantId = NULL, $type = NULL, $label = NULL, $cultureCode = NULL, $processRequest = NULL, $enabled = NULL)
{
$options = array('path' => $this->urlCreateUserAlert, 'data' => array('customerData' => BFCHelper::getQuotedString(BFCHelper::getJsonEncodeString($customerData)), 'searchData' => BFCHelper::getQuotedString(BFCHelper::getJsonEncodeString($searchData)), 'merchantId' => $merchantId, 'type' => BFCHelper::getQuotedString($type), 'label' => BFCHelper::getQuotedString($label), 'cultureCode' => BFCHelper::getQuotedString($cultureCode), 'processUserAlert' => $processRequest, 'enabled' => $enabled, '$format' => 'json'));
$url = $this->helper->getQuery($options);
$alert = null;
//$r = $this->helper->executeQuery($url);
$r = $this->helper->executeQuery($url, "POST");
if (isset($r)) {
$res = json_decode($r);
$alert = (int) $res->d->CreateUserAlert;
//$alert = $res->d->results ?: $res->d;
}
return $alert;
}
示例2: getPrivacyFromService
public function getPrivacyFromService($language = '')
{
$options = array('path' => $this->urlGetPrivacy, 'data' => array('cultureCode' => BFCHelper::getQuotedString($language), '$format' => 'json'));
$url = $this->helper->getQuery($options);
$return = null;
$r = $this->helper->executeQuery($url);
if (isset($r)) {
$res = json_decode($r);
if (!empty($res->d->results)) {
$return = $res->d->results->GetPrivacy;
} elseif (!empty($res->d)) {
$return = $res->d->GetPrivacy;
}
}
return $return;
}
示例3: setInfoRequest
public function setInfoRequest($customerData = NULL, $suggestedStay = NULL, $creditCardData = NULL, $otherNoteData = NULL, $merchantId = 0, $type = NULL, $userNotes = NULL, $label = NULL, $cultureCode = NULL, $processInfoRequest = NULL, $mailFrom = NULL)
{
$options = array('path' => $this->urlCreateInfoRequest, 'data' => array('customerData' => BFCHelper::getQuotedString(BFCHelper::getJsonEncodeString($customerData)), 'suggestedStay' => BFCHelper::getQuotedString(BFCHelper::getJsonEncodeString($suggestedStay)), 'otherNoteData' => BFCHelper::getQuotedString($otherNoteData), 'infoRequestType' => BFCHelper::getQuotedString($type), 'userNotes' => BFCHelper::getQuotedString($userNotes), 'label' => BFCHelper::getQuotedString($label), 'cultureCode' => BFCHelper::getQuotedString($cultureCode), 'processInfoRequest' => $processInfoRequest, 'mailFrom' => $mailFrom, '$format' => 'json'));
if (!empty($merchantId) && intval($merchantId) > 0) {
$options['data']['merchantId'] = $merchantId;
}
$url = $this->helper->getQuery($options);
$order = null;
//$r = $this->helper->executeQuery($url);
$r = $this->helper->executeQuery($url, "POST");
if (isset($r)) {
$res = json_decode($r);
$order = $res->d->results ?: $res->d;
}
return $order;
}
示例4: GetResourcesByIds
public function GetResourcesByIds($listsId, $language = '')
{
$options = array('path' => $this->urlGetResourcesByIds, 'data' => array('ids' => '\'' . $listsId . '\'', 'cultureCode' => BFCHelper::getQuotedString($language), '$format' => 'json', '$select' => 'Area,Rooms,Description,MerchantId,ResourceId,MerchantName,LocationName,Address,ImageUrl,LogoUrl,XPos,YPos,LocationZone,IsNewBuilding,IsReservedPrice,IsAddressVisible,IsShowcase,IsForeground,AddedOn,IsHighlight,MainMerchantCategoryId'));
$url = $this->helper->getQuery($options);
$resources = null;
$r = $this->helper->executeQuery($url, "POST");
if (isset($r)) {
$res = json_decode($r);
if (!empty($res->d->results)) {
$resources = json_encode($res->d->results);
} elseif (!empty($res->d)) {
$resources = json_encode($res->d);
}
}
return $resources;
}
示例5: GetCondominiumsByIds
public function GetCondominiumsByIds($listsId, $language = '')
{
$options = array('path' => $this->urlGetCondominiumsByIds, 'data' => array('ids' => '\'' . $listsId . '\'', 'cultureCode' => BFCHelper::getQuotedString($language), '$format' => 'json', '$select' => 'CondominiumId,Name,Description,MerchantId,AddressData,DefaultImg,XGooglePos,YGooglePos'));
$url = $this->helper->getQuery($options);
$resources = null;
$r = $this->helper->executeQuery($url, "POST");
if (isset($r)) {
$res = json_decode($r);
if (!empty($res->d->results)) {
$resources = json_encode($res->d->results);
} elseif (!empty($res->d)) {
$resources = json_encode($res->d);
}
}
return $resources;
}
示例6: setRating
public function setRating($name = NULL, $city = NULL, $typologyid = NULL, $email = NULL, $nation = NULL, $merchantId = NULL, $value1 = NULL, $value2 = NULL, $value3 = NULL, $value4 = NULL, $value5 = NULL, $totale = NULL, $pregi = NULL, $difetti = NULL, $userId = NULL, $cultureCode = NULL, $checkin = NULL, $resourceId = NULL, $orderId = NULL, $label = NULL)
{
$options = array('path' => $this->urlCreateRating, 'data' => array('name' => BFCHelper::getQuotedString($name), 'city' => BFCHelper::getQuotedString($city), 'typologyid' => $typologyid, 'email' => BFCHelper::getQuotedString($email), 'nation' => BFCHelper::getQuotedString($nation), 'merchantId' => $merchantId, 'value1' => $value1, 'value2' => $value2, 'value3' => $value3, 'value4' => $value4, 'value5' => $value5, 'total' => $totale, 'notesData' => BFCHelper::getQuotedString($pregi), 'notesData1' => BFCHelper::getQuotedString($difetti), 'userId' => $userId, 'orderId' => $orderId, 'resourceId' => $resourceId, 'checkin' => BFCHelper::getQuotedString($checkin), 'label' => BFCHelper::getQuotedString($label), 'cultureCode' => BFCHelper::getQuotedString($cultureCode), 'processRating' => 1, '$format' => 'json'));
$url = $this->helper->getQuery($options);
$ratingId = 0;
//$r = $this->helper->executeQuery($url);
$r = $this->helper->executeQuery($url, "POST");
if (isset($r)) {
$res = json_decode($r);
//$ratingId = $res->d->results ?: $res->d;
// $resRating = $res->d->results ?: $res->d;
if (!empty($res->d->results)) {
$ratingId = $res->d->results->CreateRating;
} elseif (!empty($res->d)) {
$ratingId = $res->d->CreateRating;
}
// $ratingId = $resRating->CreateRating;
}
return $ratingId;
}
示例7: setCrew
public function setCrew($customerData = NULL, $merchantId = NULL, $orderId = NULL)
{
$params = $this->getState('params');
if ($customerData == null) {
$customerData = $params['customerData'];
}
if (COM_BOOKINGFORCONNECTOR_USEEXTERNALUPDATEORDER) {
$this->urlCreateCrew = '/CreateCrewFrom' . COM_BOOKINGFORCONNECTOR_USEEXTERNALUPDATEORDERSYSTEM;
}
$options = array('path' => $this->urlCreateCrew, 'data' => array('crewData' => BFCHelper::getQuotedString(BFCHelper::getJsonEncodeString($customerData)), 'merchantId' => $merchantId, 'orderId' => $orderId, '$format' => 'json', '$expand' => 'ChildCrews'));
$url = $this->helper->getQuery($options);
$crew = null;
//$r = $this->helper->executeQuery($url);
$r = $this->helper->executeQuery($url, "POST");
if (isset($r)) {
$res = json_decode($r);
$crew = $res->d->results ?: $res->d;
}
return $crew[0];
}
示例8: getCriteoConfiguration
public function getCriteoConfiguration($pagetype = 0, $merchantsList = array(), $orderId = null)
{
$language = JFactory::getLanguage()->getTag();
$options = array('path' => $this->GetCriteoConfiguration, 'data' => array('cultureCode' => BFCHelper::getQuotedString($language), '$format' => 'json', 'pagetype' => $pagetype, 'callerUrl' => BFCHelper::getQuotedString(JURI::current()), 'merchantsList' => BFCHelper::getQuotedString(join(',', $merchantsList))));
if (isset($orderId) && !empty($orderId)) {
$options["data"]["orderId"] = $orderId;
}
$url = $this->helper->getQuery($options);
$return = null;
$r = $this->helper->executeQuery($url);
if (isset($r)) {
$res = json_decode($r);
if (!empty($res->d->results)) {
$return = $res->d->results;
} elseif (!empty($res->d)) {
$return = json_decode($res->d->GetCriteoConfiguration);
}
}
return $return;
}
示例9: getTotal
public function getTotal()
{
$userId = '';
$user = JFactory::getUser();
if ($user->id != 0) {
$userId = $user->id . "|" . $user->username . "|" . $_SERVER["SERVER_NAME"];
} else {
return 0;
}
$language = JFactory::getLanguage()->getTag();
$options = array('path' => $this->urlGetOrdersCount, 'data' => array('userid' => BFCHelper::getQuotedString($userId), 'cultureCode' => BFCHelper::getQuotedString($language), '$format' => 'json'));
// $this->applyDefaultFilter($options);
$url = $this->helper->getQuery($options);
$count = null;
$r = $this->helper->executeQuery($url);
if (isset($r)) {
$count = (int) $r;
// $res = json_decode($r);
// $count = $res->d->GetOffersCount;
}
return $count;
}
示例10: setCounterByResourceId
public function setCounterByResourceId($resourceId = null, $what = '', $language = '')
{
$params = $this->getState('params');
if ($merchantId == null) {
$merchantId = $params['merchantId'];
}
$options = array('path' => $this->urlResourceCounter, 'data' => array('resourceId' => $resourceId, 'what' => BFCHelper::getQuotedString($what), 'cultureCode' => BFCHelper::getQuotedString($language), '$format' => 'json'));
$url = $this->helper->getQuery($options);
$res = null;
$r = $this->helper->executeQuery($url);
if (isset($r)) {
$res = json_decode($r);
if (!empty($res->d->results)) {
$resReturn = $res->d->results;
} elseif (!empty($res->d)) {
$resReturn = $res->d;
}
if (!empty($resReturn)) {
$res = $resReturn->OnSellUnitCounter;
}
}
return $res;
}
示例11: getServicesByIds
public function getServicesByIds($listsId, $language = '')
{
// with randor order is not possible to otrder by another field
$options = array('path' => $this->urlServicesbyid, 'data' => array('$format' => 'json', 'ids' => '\'' . $listsId . '\'', 'cultureCode' => BFCHelper::getQuotedString($language)));
$url = $this->helper->getQuery($options);
$services = null;
$r = $this->helper->executeQuery($url);
if (isset($r)) {
$res = json_decode($r);
if (!empty($res->d->results)) {
$services = $res->d->results;
} elseif (!empty($res->d)) {
$services = $res->d;
}
}
return $services;
}
示例12: getServicesForSearchOnSell
public function getServicesForSearchOnSell($language = '')
{
$options = array('path' => $this->urlServices, 'data' => array('$format' => 'json', 'cultureCode' => BFCHelper::getQuotedString($language), 'typeId' => 2));
$url = $this->helper->getQuery($options);
$services = null;
$r = $this->helper->executeQuery($url);
if (isset($r)) {
$res = json_decode($r);
if (!empty($res->d->results)) {
$services = $res->d->results;
} elseif (!empty($res->d)) {
$services = $res->d;
}
}
return $services;
}
示例13: getResourcesFromService
public function getResourcesFromService($start, $limit, $ordering, $direction, $ignorePagination = false, $jsonResult = false)
{
$store = $this->getStoreId();
$language = JFactory::getLanguage()->getTag();
$this->currentOrdering = $ordering;
$this->currentDirection = $direction;
$params = $this->getState('params');
$newsearch = $params['newsearch'];
$tagId = $params['tagId'];
$searchid = "resources" . $tagId;
$merchantResults = $params['show_grouped'];
// $condominiumsResults = $params['condominiumsResults'];
$sessionkey = 'tags.' . $searchid . '.results';
$session = JFactory::getSession();
$results = null;
if ($newsearch == "0") {
$cachedresults = $session->get($sessionkey);
try {
if (isset($cachedresults) && !empty($cachedresults)) {
$results = (array) json_decode(gzuncompress(base64_decode($cachedresults)));
}
} catch (Exception $e) {
// echo 'Exception: ', $e->getMessage(), "<br />";
//echo 'Caught exception: ', $e->getMessage(), "\n";
}
// }else{
// BFCHelper::setFilterSearchParamsSession(null);
}
if ($results == null) {
$options = array('path' => $this->urlResources, 'data' => array('$format' => 'json', 'topRresult' => 0, 'calculate' => 0, 'cultureCode' => BFCHelper::getQuotedString($language), 'lite' => 1, 'tagids' => BFCHelper::getQuotedString($tagId)));
// $this->applyDefaultFilter($options);
$url = $this->helper->getQuery($options);
$results = null;
$r = $this->helper->executeQuery($url);
if (isset($r)) {
$res = json_decode($r);
// $results = $res->d->results ?: $res->d;
if (!empty($res->d->results)) {
$results = $res->d->results;
} elseif (!empty($res->d)) {
$results = $res->d;
}
try {
if (!empty($results)) {
shuffle($results);
}
} catch (Exception $e) {
//echo 'Caught exception: ', $e->getMessage(), "\n";
}
}
// saves parameters into session
// BFCHelper::setSearchParamsSession($params);
try {
// save current search in session to disable all further calculations upon reordering and filtering
$compr = base64_encode(gzcompress(json_encode($results), true));
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
$session->set($sessionkey, $compr);
//ciclo per filtrare i possibili filtri
// $filtersenabled = array();
//
// $filtersenabled['count'] = 0;
// if(!empty($results)){
// $filtersenabled['count'] = count($results);
// //per condominiumsResults non \E8 necessario filtrare i condomini per caratteristiche, sio basano sulle risorse
// if ($merchantResults) {
// $tmpstars = array_unique(array_map(function ($i) { return $i->MrcRating; }, $results));
// $filtersenabled['stars'] = implode(',',$tmpstars);
// $tmplocationzones = array_unique(array_map(function ($i) { return $i->MrcZoneId; }, $results));
// $filtersenabled['locationzones'] = implode(',',$tmplocationzones);
// }else{
// $tmpstars = array_unique(array_map(function ($i) { return $i->ResRating; }, $results));
// $filtersenabled['stars'] = implode(',',$tmpstars);
// $tmplocationzones = array_unique(array_map(function ($i) { return $i->ResZoneId; }, $results));
// $filtersenabled['locationzones'] = implode(',',$tmplocationzones);
// }
//
// $tmpmastertypologies = array_unique(array_map(function ($i) { return $i->MasterTypologyId; }, $results));
// $filtersenabled['mastertypologies'] = implode(',',$tmpmastertypologies);
// // elenco merchantGroup presenti nella ricerca
// $tmpmerchantgroups = array_unique(explode(",",array_reduce($results,
// function($returnedList, $item){
// $val = preg_replace('/\s+/', '', $item->MrcTagsIdList);
// if (!empty($val)) {
// $returnedList .= "," .$val;
// }
// return $returnedList;
// }
// )));
// foreach( $tmpmerchantgroups as $key => $value ) {
// if( empty( $tmpmerchantgroups[ $key ] ) )
// unset( $tmpmerchantgroups[ $key ] );
// }
// $filtersenabled['merchantgroups'] = implode(',',$tmpmerchantgroups);
// elenco Servizi presenti nella ricerca
// $tmpservices = array_unique(explode(",",array_reduce($results,
// function($returnedList, $item){
// $val = preg_replace('/\s+/', '', $item->MrcServiceIdList);
// if (!empty($val)) {
//.........这里部分代码省略.........
示例14: 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;
}
示例15: GetResourcesCalculateByIds
public function GetResourcesCalculateByIds($listsId, $language = '')
{
$params = $this->getState('params');
$ci = $params['checkin'];
$du = $params['duration'];
//$px = array_fill(0,(int)$params['paxes'],BFCHelper::$defaultAdultsAge);
//$ex = $params['extras'];
$paxages = $params['paxages'];
if ($ci == null || $du == null || $paxages == null) {
return null;
}
$options = array('path' => $this->urlGetCalculateResourcesByIds, 'data' => array('ids' => '\'' . $listsId . '\'', 'checkin' => '\'' . $ci->format('Ymd') . '\'', 'duration' => $du, 'paxages' => '\'' . implode('|', $paxages) . '\'', 'cultureCode' => BFCHelper::getQuotedString($language), '$format' => 'json'));
$url = $this->helper->getQuery($options);
$resources = null;
$r = $this->helper->executeQuery($url);
if (isset($r)) {
$res = json_decode($r);
if (!empty($res->d->results)) {
$resources = json_encode($res->d->results);
} elseif (!empty($res->d)) {
$resources = json_encode($res->d);
}
}
return $resources;
}