1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
common.php
См. документацию.
1<?php
2namespace Bitrix\Pull;
3
4class Common
5{
6 public static function jsonEncode($params)
7 {
8 $option = JSON_UNESCAPED_UNICODE;
9 static::recursiveConvertDateToString($params);
10
11 return \Bitrix\Main\Web\Json::encode($params, $option);
12 }
13
15 {
16 array_walk_recursive($params, function(&$item, $key){
17 if ($item instanceof \Bitrix\Main\Type\DateTime)
18 {
19 $item = date('c', $item->getTimestamp());
20 }
21 });
22 }
23
32 public static function findInvalidUnicodeSymbols(array $input, $currentPath = "")
33 {
34 foreach ($input as $k => $v)
35 {
36 if(is_string($input[$k]))
37 {
38 if(!mb_check_encoding($input[$k]))
39 {
40 return $currentPath . "/" . $k;
41 }
42 }
43 else if (is_array($input[$k]))
44 {
45 $subResult = static::findInvalidUnicodeSymbols($input[$k], $currentPath . "/" . $k);
46 if($subResult)
47 {
48 return $subResult;
49 }
50 }
51 }
52
53 return false;
54 }
55}
$currentPath
Определения access_edit.php:61
Определения common.php:5
static findInvalidUnicodeSymbols(array $input, $currentPath="")
Определения common.php:32
static jsonEncode($params)
Определения common.php:6
static recursiveConvertDateToString(array &$params)
Определения common.php:14
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
Определения collection.php:2
if(empty($signedUserToken)) $key
Определения quickway.php:257
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799
$option
Определения options.php:1711
$k
Определения template_pdf.php:567