本文整理汇总了PHP中BFCHelper类的典型用法代码示例。如果您正苦于以下问题:PHP BFCHelper类的具体用法?PHP BFCHelper怎么用?PHP BFCHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BFCHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: display
function display($tpl = null, $preparecontent = false)
{
BookingForConnectorViewOnSellUnitBase::basedisplay($tpl);
$item = $this->get('Item');
$document = JFactory::getDocument();
$language = $document->getLanguage();
$config = JComponentHelper::getParams('com_bookingforconnector');
BFCHelper::setState($item, 'onsellunit', 'onsellunit');
// $document->addStyleSheet('components/com_bookingforconnector/assets/css/resource.css');
// add stylesheet
JHTML::stylesheet('components/com_bookingforconnector/assets/css/bookingfor.css');
JHTML::stylesheet('components/com_bookingforconnector/assets/css/bookingfor-responsive.css');
$document->addScript('components/com_bookingforconnector/assets/js/jquery.form.js');
$document->addScript('components/com_bookingforconnector/assets/js/jquery.blockUI.js');
$document->addScript('components/com_bookingforconnector/assets/js/bf.js');
if ($this->checkAnalytics("Sales Resources Page") && $config->get('eecenabled', 0) == 1) {
$obj = new stdClass();
$obj->id = "" . $item->ResourceId . " - Sales Resource";
$obj->name = $item->Name;
$obj->category = $item->MerchantCategoryName;
$obj->brand = $item->MerchantName;
$obj->variant = 'NS';
$document->addScriptDeclaration('callAnalyticsEEc("addProduct", [' . json_encode($obj) . '], "item");');
}
$this->assignRef('document', $document);
$this->assignRef('language', $language);
$this->assignRef('item', $item);
$this->assignRef('config', $config);
// $item = $this->get('Item');
//$item->Name = $item->nome;
//$this->setBreadcrumb($item, 'resources');
$this->setBreadcrumb($item, 'onsellunits', $language);
parent::display($tpl, true);
}
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:34,代码来源:view.html.php
示例2: __construct
public function __construct($config, $order, $language, $urlBack, $url, $suffixOrder, $overrideAmount = 0, $debug = FALSE)
{
$paymentData = explode('|', $config);
/*ShopID|Separator|SecretKey|PaymentUrl */
$this->shopID = $paymentData[0];
$this->separator = $paymentData[1];
$this->SecretKey = $paymentData[2];
$this->paymentUrl = $paymentData[3];
$this->numord = sprintf('B%s%s%s%s', rand(1, 9999) . $this->separator, $order->ExternalId, $this->separator, $order->OrderId);
$this->importo = number_format($order->DepositAmount * COM_BOOKINGFORCONNECTOR_CONVERSIONCURRENCY, 2, ',', '');
$this->importoForMac = intval($order->DepositAmount * 100 * COM_BOOKINGFORCONNECTOR_CONVERSIONCURRENCY);
if (isset($suffixOrder) && $suffixOrder != "" && $overrideAmount > 0) {
$this->numord .= $this->separator . "R" . $suffixOrder;
$this->importo = number_format($overrideAmount * COM_BOOKINGFORCONNECTOR_CONVERSIONCURRENCY, 2, ',', '');
$this->importoForMac = intval($overrideAmount * 100 * COM_BOOKINGFORCONNECTOR_CONVERSIONCURRENCY);
}
$this->email = BFCHelper::getItem($order->CustomerData, 'email') . "";
$this->languageId = $this->getLanguage($language);
$this->url = $url;
$this->urlBack = $urlBack;
if ($debug) {
$this->shopID = 'MYSHOP';
$this->numord = 78;
$this->importo = '17,00';
$this->importoForMac = '1700';
$this->SecretKey = '3DfEO2B5Jjm4VC1Q3vEh';
}
//$this->mac = $this->getMac();
$this->redirectUrl = getUrl();
}
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:30,代码来源:wspayform.php
示例3: __construct
public function __construct($config, $order, $language, $urlok, $urlko, $suffixOrder, $overrideAmount = 0, $debug = FALSE)
{
$paymentData = explode('|', $config);
/*MerchantID|ShopID|UserID|Password|Separator|SecretString */
$this->merchantID = $paymentData[0];
$this->shopID = $paymentData[1];
$this->userID = $paymentData[2];
$this->password = $paymentData[3];
$this->separator = $paymentData[4];
$this->SecretKey = $paymentData[5];
//$this->paymentUrl = $paymentData[3];
$this->numeroOrdine = sprintf('B%s%s%s%s', rand(1, 9999) . $this->separator, $order->ExternalId, $this->separator, $order->OrderId);
$this->totaleOrdine = intval($order->DepositAmount * 100);
if (isset($suffixOrder) && $suffixOrder != "" && $overrideAmount > 0) {
$this->numord .= $this->separator . "R" . $suffixOrder;
$this->totaleOrdine = intval($overrideAmount * 100);
}
$this->email = BFCHelper::getItem($order->CustomerData, 'email') . "";
$this->languageId = $this->getLanguage($language);
$this->urlOk = $urlok;
$this->urlKo = $urlko;
if ($debug) {
$this->merchantID = '9999888';
$this->shopID = '99888';
$this->userID = '9999888_IPERTRD';
$this->numeroOrdine = 'VERXORDXPROD196';
$this->totaleOrdine = '1';
$this->password = 'Ipertrade2013!';
$this->SecretKey = 'b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1';
$this->tipoRispostaApv = 'click';
$this->urlOk = "http://www.dominio.it/ok.html";
$this->urlKo = "http://www.dominio.it/ko.html";
}
// $this->paymentUrl .= $this->getUrl();
}
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:35,代码来源:pagoonline.php
示例4: __construct
public function __construct($config, $order, $language, $urlBack, $url, $debug = false, $donation = false)
{
$paymentData = explode('|', $config);
/*Username|Password|Signature|Separator */
$this->Username = $paymentData[0];
$this->Password = $paymentData[1];
$this->Signature = $paymentData[2];
$this->separator = $paymentData[3];
$this->divisa = 'EUR';
$this->numord = sprintf('B%s%s%s%s', rand(1, 9999) . $this->separator, $order->ExternalId, $this->separator, $order->OrderId);
$this->email = BFCHelper::getItem($order->CustomerData, 'email') . "";
$this->languageId = $this->getLanguage($language);
$this->importo = intval($order->DepositAmount);
$this->paymentUrl = 'https://www.paypal.com/cgi-bin/webscr';
$this->paymentUrlAPI = 'https://api-3t.paypal.com/nvp';
$this->returnurl = $url;
$this->urlBack = $urlBack;
$this->method = "SetExpressCheckout";
$this->version = "109.0";
$this->paymentaction = "Sale";
if ($debug) {
$this->paymentUrl = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
$this->paymentUrlAPI = 'https://api-3t.sandbox.paypal.com/nvp';
}
//$this->requestUrl = $this->getUrl();
}
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:26,代码来源:paypalexpress.php
示例5: setBreadcrumb
function setBreadcrumb($merchant, $layout = '')
{
$mainframe = JFactory::getApplication();
$pathway = $mainframe->getPathway();
$pathway->addItem($merchant->Name, JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name)));
if ($layout != '') {
$pathway->addItem(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_MERCHANTDETAILS_LAYOUT_' . strtoupper($layout)), JRoute::_('index.php?layout=' . $layout . '&option=com_bookingforconnector&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name)));
}
}
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:9,代码来源:view.raw.php
示例6: setBreadcrumb
function setBreadcrumb($resource, $layout = '')
{
$mainframe = JFactory::getApplication();
$pathway = $mainframe->getPathway();
$pathway->addItem($resource->Merchant->Name, JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->Merchant->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name)));
$pathway->addItem(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_MERCHANTDETAILS_LAYOUT_' . strtoupper($layout)), JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&layout=' . $layout . '&merchantId=' . $resource->Merchant->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name)));
// $resourceName = BFCHelper::getLanguage($resource->Name, $this->Language);
$resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
$pathway->addItem($resourceName, JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)));
}
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:10,代码来源:view.raw.php
示例7: getOptions
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
protected function getOptions()
{
$merchantTypes = BFCHelper::getMerchantTypes();
$options = array();
if ($merchantTypes) {
foreach ($merchantTypes as $merchantType) {
$options[] = JHtml::_('select.option', $merchantType->MerchantTypeId, $merchantType->RefName);
}
}
$options = array_merge(parent::getOptions(), $options);
return $options;
}
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:17,代码来源:merchanttypes.php
示例8: getOptions
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
protected function getOptions()
{
$tags = BFCHelper::getTags();
$options = array();
if ($tags) {
foreach ($tags as $tag) {
$options[] = JHtml::_('select.option', $tag->TagId, $tag->Name);
}
}
$options = array_merge(parent::getOptions(), $options);
return $options;
}
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:17,代码来源:tags.php
示例9: getOptions
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
protected function getOptions()
{
$locationZones = BFCHelper::getLocations();
$options = array();
if ($locationZones) {
foreach ($locationZones as $lz) {
$options[] = JHtml::_('select.option', $lz->CityId, $lz->Name);
}
}
$options = array_merge(parent::getOptions(), $options);
return $options;
}
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:17,代码来源:cities.php
示例10: setBreadcrumb
function setBreadcrumb($resource, $layout = '', $language)
{
if (!empty($resource)) {
$mainframe = JFactory::getApplication();
$pathway = $mainframe->getPathway();
// resetto il pathway
$pathway->setPathway(null);
// $resourceName = BFCHelper::getLanguage($resource->Name, $language);
$resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
$pathway->addItem($resource->MerchantName, JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($resource->MerchantName)));
$pathway->addItem($resourceName, JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)));
}
}
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:13,代码来源:resourceview.php
示例11: getOptions
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
protected function getOptions()
{
$document = JFactory::getDocument();
$language = $document->getLanguage();
$masterTypologies = BFCHelper::getMasterTypologies();
$options = array();
if ($masterTypologies) {
foreach ($masterTypologies as $masterTypology) {
$options[] = JHtml::_('select.option', $masterTypology->MasterTypologyId, BFCHelper::getLanguage($masterTypology->Name, $language));
}
}
$options = array_merge(parent::getOptions(), $options);
return $options;
}
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:19,代码来源:mastertypologies.php
示例12: __construct
public function __construct($config, $order, $language, $urlBack, $url, $suffixOrder, $overrideAmount = 0, $debug = FALSE)
{
// echo "<pre>order";
// echo print_r($order);
// echo "</pre>";
//$this->helper = new wsQueryHelper(COM_BOOKINGFORCONNECTOR_WSURL, COM_BOOKINGFORCONNECTOR_APIKEY);
$paymentData = explode('|', $config);
/* MerchantId|Abi|MacKey|Separator|PaymentUrl */
$this->merchant_id = $paymentData[0];
$this->abi = $paymentData[1];
$this->SecretKey = $paymentData[2];
$this->separator = $paymentData[3];
$this->paymentUrl = $paymentData[4];
$this->order_id = sprintf('B%s%s%s%s', $this->separator, $order->ExternalId, $this->separator, $order->OrderId);
$this->email = BFCHelper::getItem($order->CustomerData, 'email') . "";
$this->lingua = $this->getLanguage($language);
$this->importo = number_format($order->DepositAmount, 2, ',', '');
//$this->order_id = $order->OrderId;
if (isset($suffixOrder) && $suffixOrder != "" && $overrideAmount > 0) {
$this->order_id .= $this->separator . "R" . $suffixOrder;
//$this->orderId .= $this->separator . "R" . $suffixOrder;
$this->importo = $overrideAmount;
$this->suffixOrder = $suffixOrder;
}
if (empty($order->ExternalId)) {
$order->ExternalId = $this->abi;
}
$this->urlok = $url;
$this->urlko = $urlBack;
$paymentDescr = "payment";
if (isset($order->donationNotes) && !empty($order->donationNotes)) {
$paymentDescr = $order->donationNotes;
}
$paymentDescr = preg_replace('/[^A-Za-z0-9\\- ]/', '', $paymentDescr);
if (strlen($paymentDescr > 120)) {
$paymentDescr = substr($paymentDescr, 0, 120);
}
$ExternalId = $order->ExternalId;
if (strlen($ExternalId > 32)) {
$ExternalId = substr($ExternalId, 0, 32);
}
$this->items = $ExternalId . $this->FieldSeparator . $paymentDescr . $this->FieldSeparator . "1" . $this->FieldSeparator . $this->importo . $this->FieldSeparator . $this->divisa . $this->macSeparator;
/*if ($debug){
$this->merchant_id = 'NCHTEST';
$this->abi = '03599';
$this->SecretKey = 'CAE5859549B7F54834040AA110A533A1';
}*/
$this->mac = $this->getMac();
}
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:49,代码来源:virtualpay.php
示例13: __construct
public function __construct($config, $order, $language, $urlBack, $url, $suffixOrder, $overrideAmount = 0, $debug = FALSE)
{
// echo "<pre>order";
// echo print_r($order);
// echo "</pre>";
//$this->helper = new wsQueryHelper(COM_BOOKINGFORCONNECTOR_WSURL, COM_BOOKINGFORCONNECTOR_APIKEY);
$paymentData = explode('|', $config);
/* storename|ksig|Separator|PaymentUrl */
$this->storename = $paymentData[0];
$this->ksig = $paymentData[1];
$this->separator = $paymentData[2];
$this->paymentUrl = $paymentData[3];
$this->order_id = sprintf('B%s%s%s%s', $this->separator, $order->ExternalId, $this->separator, $order->OrderId);
$this->email = BFCHelper::getItem($order->CustomerData, 'email') . "";
$this->language = $this->getLanguage($language);
$this->importo = number_format($order->DepositAmount, 2, '.', '');
$this->currentDateTime = date("Y:m:d-H:i:s");
//$this->order_id = $order->OrderId;
if (isset($suffixOrder) && $suffixOrder != "" && $overrideAmount > 0) {
$this->order_id .= $this->separator . "R" . $suffixOrder;
//$this->orderId .= $this->separator . "R" . $suffixOrder;
$this->importo = number_format($overrideAmount, 2, '.', '');
$this->suffixOrder = $suffixOrder;
}
$this->responseSuccessURL = $url;
$this->responseFailURL = $urlBack;
$paymentDescr = "payment";
if (isset($order->donationNotes) && !empty($order->donationNotes)) {
$paymentDescr = $order->donationNotes;
}
$paymentDescr = preg_replace('/[^A-Za-z0-9\\- ]/', '', $paymentDescr);
if (strlen($paymentDescr > 120)) {
$paymentDescr = substr($paymentDescr, 0, 120);
}
if (empty($order->ExternalId)) {
$this->invoicenumber = $order->ExternalId;
}
if (strlen($this->invoicenumber > 32)) {
$this->invoicenumber = substr($this->invoicenumber, 0, 32);
}
$this->info = $this->invoicenumber . $this->FieldSeparator . $paymentDescr . $this->FieldSeparator . "1" . $this->FieldSeparator . $this->importo . $this->FieldSeparator . $this->divisa;
/*if ($debug){
$this->merchant_id = 'NCHTEST';
$this->abi = '03599';
$this->SecretKey = 'CAE5859549B7F54834040AA110A533A1';
}*/
$this->hash = $this->getHash();
}
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:48,代码来源:bnlpositivity.php
示例14: getOptions
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
protected function getOptions()
{
$document = JFactory::getDocument();
$language = $document->getLanguage();
$merchantCategories = BFCHelper::getMerchantCategories();
$options = array();
if ($merchantCategories) {
foreach ($merchantCategories as $merchantCategory) {
$currOpt = JHtml::_('select.option', $merchantCategory->MerchantCategoryId, BFCHelper::getLanguage($merchantCategory->Name, $language));
$currOpt->checked = null;
$options[] = $currOpt;
}
}
$options = array_merge(parent::getOptions(), $options);
return $options;
}
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:21,代码来源:merchantcategories.php
示例15: 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;
}
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:16,代码来源:inforequest.php
示例16: 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;
}
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:16,代码来源:portal.php
示例17: display
function display($tpl = NULL, $preparecontent = false)
{
$document = JFactory::getDocument();
$language = $document->getLanguage();
$config = JComponentHelper::getParams('com_bookingforconnector');
$app = JFactory::getApplication();
// Initialise variables
$state = $this->get('State');
$items = $this->get('Items');
$pagination = $this->get('Pagination');
$sortColumn = $state->get('list.ordering');
$sortDirection = $state->get('list.direction');
$params = $state->params;
$typologies = $this->getModel()->getMasterTypologies(true, $language);
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseWarning(500, implode("\n", $errors));
return false;
}
$pagination->setAdditionalUrlParam("filter_order", $sortColumn);
$pagination->setAdditionalUrlParam("filter_order_Dir", $sortDirection);
$pagination->setAdditionalUrlParam("searchid", $params['searchid']);
$filters = BFCHelper::getFilterSearchParamsSession();
if (!empty($filters)) {
foreach ($filters as $key => $value) {
$pagination->setAdditionalUrlParam("filters[" . $key . "]", $value);
}
}
$hidesort = false;
$this->assignRef('state', $state);
$this->assignRef('params', $params);
$this->assignRef('items', $items);
$this->assignRef('pagination', $pagination);
$this->assignRef('language', $language);
$this->assignRef('typologies', $typologies);
$this->assignRef('config', $config);
$this->assignRef('hidesort', $hidesort);
$maxItemsView = 3;
$this->assignRef('maxItemsView', $maxItemsView);
$analyticsEnabled = $this->checkAnalytics("");
$this->assignRef('analyticsEnabled', $analyticsEnabled);
// Display the view
parent::display($tpl, true);
}
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:44,代码来源:view.raw.php
示例18: 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;
}
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:20,代码来源:ratings.php
示例19: 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;
}
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:20,代码来源:criteo.php
示例20: 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];
}
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:20,代码来源:crew.php
注:本文中的BFCHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论