1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
UpdateServerDataParser.php
См. документацию.
1
<?php
2
namespace
Bitrix\Main\UpdateSystem;
3
4
class
UpdateServerDataParser
5
{
6
private
const
WRAPER_TAG =
"DATA"
;
7
private
string
$text;
8
9
public
function
__construct
(
string
$text)
10
{
11
$this->text = $text;
12
}
13
14
public
function
parse
():
array
15
{
16
$strServerOutput =
$this->text
;
17
$arRes
= [];
18
$strError
=
''
;
19
\CUpdateSystem::ParseServerData
($strServerOutput,
$arRes
,
$strError
);
20
21
if
(!isset(
$arRes
[self::WRAPER_TAG]) || !is_array(
$arRes
[self::WRAPER_TAG][
'#'
]))
22
{
23
return
[];
24
}
25
26
$result
= [];
27
foreach
(
$arRes
[self::WRAPER_TAG][
'#'
] as $tag =>
$items
)
28
{
29
$result
[$tag] = [];
30
foreach
(
$items
as $item)
31
{
32
$result
[$tag] = array_merge(
$result
[$tag], $item[
'@'
]);
33
if
(isset($item[
'#'
]) && !empty($item[
'#'
]))
34
{
35
$result
[$tag][
'_VALUE'
] = $item[
'#'
];
36
}
37
}
38
}
39
40
return
$result
;
41
}
42
}
Bitrix\Main\UpdateSystem\UpdateServerDataParser
Определения
UpdateServerDataParser.php:5
Bitrix\Main\UpdateSystem\UpdateServerDataParser\parse
parse()
Определения
UpdateServerDataParser.php:14
Bitrix\Main\UpdateSystem\UpdateServerDataParser\__construct
__construct(string $text)
Определения
UpdateServerDataParser.php:9
CUpdateSystem\ParseServerData
static ParseServerData(&$strServerOutput, &$arRes, &$strError)
Определения
update_class.php:2769
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
$strError
$strError
Определения
options_user_settings.php:4
$text
$text
Определения
template_pdf.php:79
$items
$items
Определения
template.php:224
$arRes
$arRes
Определения
options.php:104
bitrix
modules
main
lib
UpdateSystem
UpdateServerDataParser.php
Создано системой
1.14.0