1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
entity.php
См. документацию.
1<?php
2
3namespace Bitrix\Sale\TradingPlatform\Ebay\Api;
4
5use Bitrix\Main\Localization\Loc;
6use Bitrix\Main\SystemException;
7use Bitrix\Main\ArgumentNullException;
8
9Loc::loadMessages(__FILE__);
10
11abstract class Entity
12{
13 protected $siteId;
14 protected $apiCaller;
15 protected $authToken;
16 protected $ebaySiteId;
17 protected $warningLevel = "High";
18
19 public function __construct($siteId)
20 {
21 if(!isset($siteId))
22 throw new ArgumentNullException("siteId");
23
24 $this->siteId = $siteId;
26 $settings = $ebay->getSettings();
27
28 if(empty($settings[$siteId]["API"]["SITE_ID"]))
29 throw new SystemException(Loc::getMessage('SALE_EBAY_ENTITY_SETTINGS_EMPTY', array('#SITE_ID#' => $siteId)));
30
31 if(empty($settings[$siteId]["API"]["SITE_ID"]))
32 throw new ArgumentNullException(Loc::getMessage('SALE_EBAY_ENTITY_TOKEN_EMPTY', array('#SITE_ID#' => $siteId)));
33
34 $this->ebaySiteId = $settings[$siteId]["API"]["SITE_ID"];
35 $this->authToken = $settings[$siteId]["API"]["AUTH_TOKEN"];
36 $this->apiCaller = new Caller( array(
37 "EBAY_SITE_ID" => $settings[$siteId]["API"]["SITE_ID"],
38 "URL" => $ebay->getApiUrl(),
39 ));
40 }
41
42 protected function array2Tags(array $params)
43 {
44 $result = "";
45
46 foreach($params as $tag => $value)
47 {
48 if(is_array($value))
49 {
50 reset($value);
51
52 if(key($value) !== 0)
53 {
54 $result .= $this->array2Tags($value);
55 }
56 else
57 {
58 foreach($value as $val)
59 {
60 $result .= '<'.$tag.'>'.$val.'</'.$tag.'>'."\n";
61 }
62 }
63 }
64 elseif($value <> '')
65 {
66 $result .= '<'.$tag.'>'.$value.'</'.$tag.'>'."\n";
67 }
68 }
69
70 return $result;
71 }
72}
array2Tags(array $params)
Определения entity.php:42
static getInstance()
Определения ebay.php:23
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
$settings
Определения product_settings.php:43
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения prolog_main_admin.php:393
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799
$val
Определения options.php:1793