Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
baseapiobject.php
1
<?
2
3
namespace
Bitrix\Seo\Retargeting
;
4
5
class
BaseApiObject
6
{
7
const
TYPE_CODE
=
''
;
8
10
protected
$request
;
11
13
protected
$service
;
14
15
protected
static
$listRowMap
= array();
16
17
public
static
function
normalizeListRow
(array $row)
18
{
19
$return = array();
20
foreach
(static::$listRowMap as $key => $value)
21
{
22
if
(is_array($value))
23
{
24
$return[$key] = $value;
25
}
26
else
27
{
28
$return[$key] = $row[$value];
29
}
30
}
31
32
return
$return;
33
}
34
35
public
function
__construct
()
36
{
37
$this->request =
Request::create
(static::TYPE_CODE);
38
$this->request->setUseDirectQuery($this instanceof
IRequestDirectly
);
39
}
40
44
public
function
getRequest
()
45
{
46
return
$this->request
;
47
}
48
49
public
function
setRequest
(
Request
$request
)
50
{
51
$this->request =
$request
;
52
return
$this;
53
}
54
61
public
static
function
create
($type, $parameters =
null
,
IService
$service
=
null
)
62
{
63
$instance =
Factory::create
(get_called_class(), $type, $parameters);
64
if
(
$service
)
65
{
66
$instance->setService(
$service
);
67
}
68
69
return
$instance;
70
}
71
72
public
function
setService
(
IService
$service
)
73
{
74
$this->service =
$service
;
75
$this->request->setAuthAdapter($this->service->getAuthAdapter(static::TYPE_CODE));
76
77
return
$this;
78
}
79
}
Bitrix\Main\Request
Definition
request.php:10
Bitrix\Seo\Retargeting\BaseApiObject
Definition
baseapiobject.php:6
Bitrix\Seo\Retargeting\BaseApiObject\__construct
__construct()
Definition
baseapiobject.php:35
Bitrix\Seo\Retargeting\BaseApiObject\$listRowMap
static $listRowMap
Definition
baseapiobject.php:15
Bitrix\Seo\Retargeting\BaseApiObject\TYPE_CODE
const TYPE_CODE
Definition
baseapiobject.php:7
Bitrix\Seo\Retargeting\BaseApiObject\$request
$request
Definition
baseapiobject.php:10
Bitrix\Seo\Retargeting\BaseApiObject\create
static create($type, $parameters=null, IService $service=null)
Definition
baseapiobject.php:61
Bitrix\Seo\Retargeting\BaseApiObject\setRequest
setRequest(Request $request)
Definition
baseapiobject.php:49
Bitrix\Seo\Retargeting\BaseApiObject\setService
setService(IService $service)
Definition
baseapiobject.php:72
Bitrix\Seo\Retargeting\BaseApiObject\normalizeListRow
static normalizeListRow(array $row)
Definition
baseapiobject.php:17
Bitrix\Seo\Retargeting\BaseApiObject\getRequest
getRequest()
Definition
baseapiobject.php:44
Bitrix\Seo\Retargeting\BaseApiObject\$service
$service
Definition
baseapiobject.php:13
Bitrix\Seo\Retargeting\Factory\create
static create($object, $type, $parameters=null)
Definition
factory.php:9
Bitrix\Seo\Retargeting\Request\create
static create($type)
Definition
request.php:127
Bitrix\Seo\Retargeting\IRequestDirectly
Definition
irequestdirectly.php:6
Bitrix\Seo\Retargeting\IService
Definition
iservice.php:6
Bitrix\Seo\Retargeting
Definition
account.php:3
modules
seo
lib
retargeting
baseapiobject.php
Создано системой
1.10.0