1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
UpdateServerDataParser.php
См. документацию.
1<?php
2namespace Bitrix\Main\UpdateSystem;
3
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 = '';
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}
static ParseServerData(&$strServerOutput, &$arRes, &$strError)
Определения update_class.php:2769
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
$strError
Определения options_user_settings.php:4
$text
Определения template_pdf.php:79
$items
Определения template.php:224
$arRes
Определения options.php:104