1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
yandexjson.php
См. документацию.
1
<?php
2
namespace
Bitrix\Seo\Engine;
3
4
use Bitrix\Main\Web\Json;
5
6
class
YandexJson
extends
Json
7
{
8
public
static
function
encode
(
$data
,
$options
=
null
)
9
{
10
// php 5.4.0+
11
if
(defined(
'JSON_UNESCAPED_UNICODE'
))
12
{
13
return
parent::encode(
$data
, JSON_UNESCAPED_UNICODE);
14
}
15
else
16
{
17
return
static::_encode(static::convertData(
$data
));
18
}
19
}
20
21
protected
static
function
_encode
(
$data
)
22
{
23
$str
=
''
;
24
if
(is_array(
$data
))
25
{
26
$assoc = array_diff_key(
$data
,array_keys(array_keys(
$data
)));
27
28
$str
.= $assoc ?
'{'
:
'['
;
29
30
$first
=
true
;
31
foreach
(
$data
as
$key
=> $value)
32
{
33
$str
.=
$first
?
''
:
','
;
34
$str
.= $assoc ? static::_quote(
$key
).
':'
:
''
;
35
$str
.= static::_encode($value);
36
$first
=
false
;
37
}
38
39
$str
.= $assoc ?
'}'
:
']'
;
40
}
41
elseif
(is_int(
$data
))
42
{
43
$str
=
$data
;
44
}
45
elseif
(
$data
===
null
)
46
{
47
$str
=
"null"
;
48
}
49
else
50
{
51
$str
= static::_quote(
$data
);
52
}
53
54
return
$str
;
55
}
56
57
protected
static
function
_quote
($s)
58
{
59
return
'"'
.str_replace(
array
(
'\\'
,
'"'
),
array
(
'\\\\'
,
'\"'
), $s).
'"'
;
60
}
61
}
$first
if(isset( $_REQUEST["mode"]) &&$_REQUEST["mode"]=="ajax") if(isset($_REQUEST["mode"]) && $_REQUEST["mode"]=="save_lru" &&check_bitrix_sessid()) $first
Определения
access_dialog.php:54
Bitrix\Main\Web\Json
Определения
json.php:9
Bitrix\Seo\Engine\YandexJson
Определения
yandexjson.php:7
Bitrix\Seo\Engine\YandexJson\_quote
static _quote($s)
Определения
yandexjson.php:57
Bitrix\Seo\Engine\YandexJson\encode
static encode($data, $options=null)
Определения
yandexjson.php:8
Bitrix\Seo\Engine\YandexJson\_encode
static _encode($data)
Определения
yandexjson.php:21
$options
$options
Определения
commerceml2.php:49
$str
$str
Определения
commerceml2.php:63
$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
elseif
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения
prolog_main_admin.php:393
$key
if(empty($signedUserToken)) $key
Определения
quickway.php:257
bitrix
modules
seo
lib
engine
yandexjson.php
Создано системой
1.14.0