1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
entity.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Sale\TradingPlatform\Ebay\Api;
4
5
use Bitrix\Main\Localization\Loc;
6
use Bitrix\Main\SystemException;
7
use Bitrix\Main\ArgumentNullException;
8
9
Loc::loadMessages(__FILE__);
10
11
abstract
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
;
25
$ebay =
\Bitrix\Sale\TradingPlatform\Ebay\Ebay::getInstance
();
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
}
Bitrix\Main\ArgumentNullException
Определения
ArgumentNullException.php:9
Bitrix\Main\SystemException
Определения
SystemException.php:9
Bitrix\Sale\TradingPlatform\Ebay\Api\Caller
Определения
caller.php:11
Bitrix\Sale\TradingPlatform\Ebay\Api\Entity
Определения
entity.php:12
Bitrix\Sale\TradingPlatform\Ebay\Api\Entity\__construct
__construct($siteId)
Определения
entity.php:19
Bitrix\Sale\TradingPlatform\Ebay\Api\Entity\$authToken
$authToken
Определения
entity.php:15
Bitrix\Sale\TradingPlatform\Ebay\Api\Entity\$ebaySiteId
$ebaySiteId
Определения
entity.php:16
Bitrix\Sale\TradingPlatform\Ebay\Api\Entity\$siteId
$siteId
Определения
entity.php:13
Bitrix\Sale\TradingPlatform\Ebay\Api\Entity\$apiCaller
$apiCaller
Определения
entity.php:14
Bitrix\Sale\TradingPlatform\Ebay\Api\Entity\array2Tags
array2Tags(array $params)
Определения
entity.php:42
Bitrix\Sale\TradingPlatform\Ebay\Api\Entity\$warningLevel
$warningLevel
Определения
entity.php:17
Bitrix\Sale\TradingPlatform\Ebay\Ebay\getInstance
static getInstance()
Определения
ebay.php:23
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
$settings
$settings
Определения
product_settings.php:43
elseif
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения
prolog_main_admin.php:393
$params
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения
template.php:799
$val
$val
Определения
options.php:1793
bitrix
modules
sale
lib
tradingplatform
ebay
api
entity.php
Создано системой
1.14.0