1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
responseyandex.php
См. документацию.
1
<?
2
3
namespace
Bitrix\Seo\Retargeting\Services;
4
5
use \Bitrix\Main\Error;
6
use \Bitrix\Main\Web\Json;
7
use \Bitrix\Seo\Retargeting\Response;
8
9
10
class
ResponseYandex
extends
Response
11
{
12
const
TYPE_CODE
=
'yandex'
;
13
14
protected
function
getSkippedErrorCodes
()
15
{
16
return
array
(
17
'400'
// invalid_parameter: segment data not modified
18
);
19
}
20
21
public
function
parse
(
$data
)
22
{
23
$endpointParts = explode(
'/'
, $this->getRequest()->getEndpoint());
24
25
$parsed = is_array(
$data
) ?
$data
: Json::decode(
$data
);
26
27
if
(isset($parsed[
'errors'
]))
28
{
29
if
(in_array((
string
) $parsed[
'code'
], $this->
getSkippedErrorCodes
()))
30
{
31
$this->setData(
array
());
32
}
33
else
34
{
35
$this->addError(
new
Error
($parsed[
'message'
], $parsed[
'code'
]));
36
}
37
}
38
39
if
(isset($parsed[$endpointParts[0]]))
40
{
41
$this->setData($parsed[$endpointParts[0]]);
42
}
43
else
if
(!isset($parsed[
'errors'
]))
44
{
45
$this->setData($parsed);
46
}
47
}
48
}
Bitrix\Main\Error
Определения
error.php:15
Bitrix\Main\Response
Определения
response.php:5
Bitrix\Seo\Retargeting\Services\ResponseYandex
Определения
responseyandex.php:11
Bitrix\Seo\Retargeting\Services\ResponseYandex\TYPE_CODE
const TYPE_CODE
Определения
responseyandex.php:12
Bitrix\Seo\Retargeting\Services\ResponseYandex\getSkippedErrorCodes
getSkippedErrorCodes()
Определения
responseyandex.php:14
Bitrix\Seo\Retargeting\Services\ResponseYandex\parse
parse($data)
Определения
responseyandex.php:21
$data
$data['IS_AVAILABLE']
Определения
.description.php:13
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
bitrix
modules
seo
lib
retargeting
services
responseyandex.php
Создано системой
1.14.0