1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
text.php
См. документацию.
1<?php
2namespace Bitrix\Im;
3
4use Bitrix\Im\Integration\Socialnetwork\Extranet;
5use Bitrix\Im\V2\Message\Text\BbCode\Timestamp;
6use Bitrix\Im\V2\Message\Text\BbCode\Timestamp\DateFormat;
7use Bitrix\Main\Localization\Loc;
8use Bitrix\Main\Type\DateTime;
9
10Loc::loadMessages(__FILE__);
11
12class Text
13{
14 private static $replacements = Array();
15 private static $parsers = Array();
16
17 private static $emojiList = [
18 "file" => ':f09f938e:',
19 "image" => ':f09f96bc:',
20 "audio" => ':f09f9488:',
21 "video" => ':f09f93ba:',
22 "code" => ':f09f9384:',
23 "call" => ':f09f939e:',
24 "attach" => ':f09fa7a9:',
25 "quote" => ':f09f92ac:',
26 ];
27
28 public static function parse($text, $params = Array())
29 {
30 $linkParam = $params['LINK'] ?? null;
31 $smilesParam = $params['SMILES'] ?? null;
32 $linkLimitParam = $params['LINK_LIMIT'] ?? null;
33 $textLimitParam = $params['TEXT_LIMIT'] ?? null;
34 $cutStrikeParam = $params['CUT_STRIKE'] ?? null;
35
36 $parseId = md5($linkParam.$smilesParam.$linkLimitParam.$textLimitParam);
37 if (isset(self::$parsers[$parseId]))
38 {
39 $parser = self::$parsers[$parseId];
40 }
41 else
42 {
43 $parser = new \CTextParser();
44 $parser->serverName = Common::getPublicDomain();
45 $parser->maxStringLen = intval($textLimitParam);
46
47 $parser->anchorType = 'bbcode';
48 $parser->maxAnchorLength = intval($linkLimitParam)? $linkLimitParam: 55;
49
50 foreach ($parser->allow as $tag => $value)
51 {
52 $parser->allow[$tag] = 'N';
53 }
54 $parser->allow['EMOJI'] = 'Y';
55 $parser->allow['HTML'] = 'Y';
56 $parser->allow['ANCHOR'] = 'Y';
57 $parser->allow['TEXT_ANCHOR'] = 'Y';
58
59 self::$parsers[$parseId] = $parser;
60 }
61
62 $text = preg_replace_callback("/\[CODE\](.*?)\[\/CODE\]/si", Array('\Bitrix\Im\Text', 'setReplacement'), $text);
63 $text = preg_replace_callback("/\[PUT(?:=(.+?))?\](.+?)?\[\/PUT\]/i", Array('\Bitrix\Im\Text', 'setReplacement'), $text);
64 $text = preg_replace_callback("/\[SEND(?:=(.+?))?\](.+?)?\[\/SEND\]/i", Array('\Bitrix\Im\Text', 'setReplacement'), $text);
65 $text = preg_replace_callback("/\[USER=([0-9]{1,})\]\[\/USER\]/i", Array('\Bitrix\Im\Text', 'modifyShortUserTag'), $text);
66
67 if ($cutStrikeParam === 'Y')
68 {
69 $text = preg_replace("/\[s\].*?\[\/s\]/i", "", $text);
70 }
71
72 $text = $parser->convertText($text);
73
74 $text = str_replace(['<br />', '#BR#', '[br]'], "\n", $text);
75 $text = str_replace(["&#169;", "&#153;", "&#174;"], ["(c)", "(tm)", "(r)"], $text);
76 $text = str_replace("&nbsp;", " ", $text);
77 $text = str_replace("&quot;", "\"", $text);
78 $text = str_replace("&#092;", "\\", $text);
79 $text = str_replace("&#036;", "\$", $text);
80 $text = str_replace("&#33;", "!", $text);
81 $text = str_replace("&#91;", "[", $text);
82 $text = str_replace("&#93;", "]", $text);
83 $text = str_replace("&#39;", "'", $text);
84 $text = str_replace("&lt;", "<", $text);
85 $text = str_replace("&gt;", ">", $text);
86 $text = str_replace("&#124;", '|', $text);
87 $text = str_replace("&amp;", "&", $text);
88
89 $text = self::recoverReplacements($text);
90
91 return $text;
92 }
93
94 public static function parseLegacyFormat($text, $params = Array())
95 {
96 if (!$text)
97 {
98 return '';
99 }
100
101 $safeParam = $params['SAFE'] ?? null;
102 $linkParam = $params['LINK'] ?? null;
103 $fontParam = $params['FONT'] ?? null;
104 $smilesParam = $params['SMILES'] ?? null;
105 $textAnchorParam = $params['TEXT_ANCHOR'] ?? null;
106 $linkLimitParam = $params['LINK_LIMIT'] ?? null;
107 $textLimitParam = $params['TEXT_LIMIT'] ?? null;
108 $linkTargetSelfParam = $params['LINK_TARGET_SELF'] ?? null;
109 $cutStrikeParam = $params['CUT_STRIKE'] ?? null;
110
111 if (!$safeParam || $safeParam === 'Y')
112 {
114 }
115
116 $allowTags = [
117 'HTML' => 'N',
118 'USER' => 'N',
119 'ANCHOR' => $linkParam === 'N' ? 'N' : 'Y',
120 'BIU' => 'Y',
121 'IMG' => 'N',
122 'QUOTE' => 'N',
123 'CODE' => 'N',
124 'FONT' => $fontParam === 'Y' ? 'Y' : 'N',
125 'LIST' => 'N',
126 'SPOILER' => 'N',
127 'SMILES' => $smilesParam === 'N' ? 'N' : 'Y',
128 'EMOJI' => 'Y',
129 'NL2BR' => 'Y',
130 'VIDEO' => 'N',
131 'TABLE' => 'N',
132 'CUT_ANCHOR' => 'N',
133 'SHORT_ANCHOR' => 'N',
134 'ALIGN' => 'N',
135 'TEXT_ANCHOR' => $textAnchorParam === 'N' ? 'N' : 'Y',
136 ];
137
138 $parseId = md5('legacy'.$linkParam.$smilesParam.$linkLimitParam.$textLimitParam.$linkTargetSelfParam);
139 if (isset(self::$parsers[$parseId]))
140 {
141 $parser = self::$parsers[$parseId];
142 }
143 else
144 {
145 $parser = new \CTextParser();
146 $parser->serverName = Common::getPublicDomain();
147 $parser->maxAnchorLength = intval($linkLimitParam)? $linkLimitParam: 55;
148 $parser->maxStringLen = intval($textLimitParam);
149 $parser->allow = $allowTags;
150 if ($linkTargetSelfParam === 'Y')
151 {
152 $parser->link_target = "_self";
153 }
154
155 self::$parsers[$parseId] = $parser;
156 }
157
158 $text = preg_replace_callback("/\[PUT(?:=(.+?))?\](.+?)?\[\/PUT\]/i", Array('\Bitrix\Im\Text', 'setReplacement'), $text);
159 $text = preg_replace_callback("/\[SEND(?:=(.+?))?\](.+?)?\[\/SEND\]/i", Array('\Bitrix\Im\Text', 'setReplacement'), $text);
160 $text = preg_replace_callback("/\[CODE\](.*?)\[\/CODE\]/si", Array('\Bitrix\Im\Text', 'setReplacement'), $text);
161 $text = preg_replace_callback("/\[USER=([0-9]{1,})\]\[\/USER\]/i", Array('\Bitrix\Im\Text', 'modifyShortUserTag'), $text);
162
163 if ($cutStrikeParam === 'Y')
164 {
165 $text = preg_replace("/\[s\].*?\[\/s\]/i", "", $text);
166 }
167
168 $text = $parser->convertText($text);
169
170 $text = str_replace(array('#BR#', '[br]', '[BR]'), '<br/>', $text);
171
172 $text = self::recoverReplacements($text);
173
174 return $text;
175 }
176
177 public static function getReplaceMap($text)
178 {
179 $replaces = [];
180
181 $dates = self::getDateConverterParams($text);
182 foreach ($dates as $result)
183 {
184 $replaces[] = [
185 'TYPE' => 'DATE',
186 'TEXT' => $result->getText(),
187 'VALUE' => $result->getDate(),
188 'START' => $result->getTextPosition(),
189 'END' => $result->getTextPosition()+$result->getTextLength(),
190 ];
191 }
192
193 return self::resolveIntersect($replaces);
194 }
195
196 private static function resolveIntersect(array $segments): array
197 {
198 usort($segments, fn(array $segmentA, array $segmentB) => $segmentA['START'] <=> $segmentB['START']);
199
200 $result = [];
201 $maxEnd = -1;
202
203 foreach ($segments as $segment)
204 {
205 if ($segment['START'] > $maxEnd)
206 {
207 $result[] = $segment;
208 $maxEnd = $segment['END'];
209 }
210 }
211
212 return array_reverse($result);
213 }
214
219 public static function getDateConverterParams($text)
220 {
221 if ($text == '')
222 return Array();
223
224 $text = preg_replace_callback("/\[PUT(?:=(.+?))?\](.+?)?\[\/PUT\]/i", Array('\Bitrix\Im\Text', 'setReplacement'), $text);
225 $text = preg_replace_callback("/\[SEND(?:=(.+?))?\](.+?)?\[\/SEND\]/i", Array('\Bitrix\Im\Text', 'setReplacement'), $text);
226 $text = preg_replace_callback('/\[URL\=([^\]]*)\]([^\]]*)\[\/URL\]/i', Array('\Bitrix\Im\Text', 'setReplacement'), $text);
227 $text = preg_replace_callback('/(https?):\/\/(([a-z0-9$_\.\+!\*\'\‍(\‍),;\?&=-]|%[0-9a-f]{2})+(:([a-z0-9$_\.\+!\*\'\‍(\‍),;\?&=-]|%[0-9a-f]{2})+)?@)?(?#)((([a-z0-9]\.|[a-z0-9][a-z0-9-]*[a-z0-9]\.)*[a-z][a-z0-9-]*[a-z0-9]|((\d|[1-9]\d|1\d{2}|2[0-4][0-9]|25[0-5])\.){3}(\d|[1-9]\d|1\d{2}|2[0-4][0-9]|25[0-5]))(:\d+)?)(((\/+([a-z0-9$_\.\+!\*\'\‍(\‍),;:@&=-]|%[0-9a-f]{2})*)*(\?([a-z0-9$_\.\+!\*\'\‍(\‍),;:@&=-]|%[0-9a-f]{2})*)?)?)?(#([a-z0-9$_\.\+!\*\'\‍(\‍),;:@&=-]|%[0-9a-f]{2})*)?/im', Array('\Bitrix\Im\Text', 'setReplacement'), $text);
228 $text = preg_replace_callback('#\-{54}(.+?)\-{54}#s', Array('\Bitrix\Im\Text', 'setReplacement'), $text);
229
230 return \Bitrix\Main\Text\DateConverter::decode($text, 1000);
231 }
232
233 public static function isOnlyEmoji($text)
234 {
235 $total = 0;
236 $count = 0;
237
238 $pattern = '%(?:
239 \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
240 | [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
241 | \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
242 )%xs';
243 $text = preg_replace_callback($pattern, function () {return "";}, $text, 4-$total, $count);
244 $total += $count;
245
246 if ($total > 3)
247 {
248 return false;
249 }
250
251 if ($total <= 0)
252 {
253 return false;
254 }
255
256 $text = trim($text);
257
258 return !$text;
259 }
260
261 public static function setReplacement($match)
262 {
263 $code = '####REPLACEMENT_MARK_'.count(self::$replacements).'####';
264
265 self::$replacements[$code] = $match[0];
266
267 return $code;
268 }
269
270 public static function recoverReplacements($text)
271 {
272 if (empty(self::$replacements))
273 {
274 return $text;
275 }
276
277 foreach(self::$replacements as $code => $value)
278 {
279 $text = str_replace($code, $value, $text);
280 }
281
282 if (mb_strpos($text, '####REPLACEMENT_MARK_') !== false)
283 {
284 $text = self::recoverReplacements($text);
285 }
286
287 self::$replacements = Array();
288
289 return $text;
290 }
291
292 public static function modifyShortUserTag($matches)
293 {
294 $userId = $matches[1];
295 $userName = \Bitrix\Im\User::getInstance($userId)->getFullName(false);
296 return '[USER='.$userId.' REPLACE]'.$userName.'[/USER]';
297 }
298
299 public static function removeBbCodes($text, $withFile = false, $attachValue = false)
300 {
301 if ($attachValue)
302 {
303 if ($attachValue === true || preg_match('/^(\d+)$/', $attachValue))
304 {
305 $text .= " [".Loc::getMessage('IM_MESSAGE_ATTACH')."]";
306 }
307 else
308 {
309 $text .= ' '. $attachValue;
310 }
311 }
312
313 $text = preg_replace("/\[s\](.*?)\[\/s\]/i", "", $text);
314 $text = preg_replace("/\[[buis]\](.*?)\[\/[buis]\]/i", "$1", $text);
315 $text = preg_replace("/\[url\](.*?)\[\/url\]/iu", "$1", $text);
316 $text = preg_replace("/\[url\\s*=\\s*((?:[^\\[\\]]++|\\[ (?: (?>[^\\[\\]]+) | (?:\\1) )* \\])+)\\s*\\](.*?)\\[\\/url\\]/ixsu", "$2", $text);
317 $text = preg_replace("/\[RATING=([1-5]{1})\]/i", " [".Loc::getMessage('IM_MESSAGE_RATING')."] ", $text);
318 $text = preg_replace("/\[ATTACH=([0-9]{1,})\]/i", " [".Loc::getMessage('IM_MESSAGE_ATTACH')."] ", $text);
319 $text = preg_replace_callback("/\[USER=([0-9]{1,})\]\[\/USER\]/i", Array('\Bitrix\Im\Text', 'modifyShortUserTag'), $text);
320 $text = preg_replace("/\[USER=([0-9]+)( REPLACE)?](.*?)\[\/USER]/i", "$3", $text);
321 $text = preg_replace("/\[dialog=(chat\d+|\d+:\d)(?: message=(\d+))?](.*?)\[\/dialog]/i", "$3", $text);
322 $text = preg_replace("/\[context=(chat\d+|\d+:\d+)\/(\d+)](.*?)\[\/context]/i", "$3", $text);
323 $text = preg_replace("/\[CHAT=([0-9]{1,})\](.*?)\[\/CHAT\]/i", "$2", $text);
324 $text = preg_replace("/\[SEND(?:=(.+?))?\](.+?)?\[\/SEND\]/i", "$2", $text);
325 $text = preg_replace("/\[PUT(?:=(.+?))?\](.+?)?\[\/PUT\]/i", "$2", $text);
326 $text = preg_replace("/\[CALL(?:=(.+?))?\](.+?)?\[\/CALL\]/i", "$2", $text);
327 $text = preg_replace("/\[PCH=([0-9]{1,})\](.*?)\[\/PCH\]/i", "$2", $text);
328 $text = preg_replace("/\[size=(\d+)](.*?)\[\/size]/i", "$2", $text);
329 $text = preg_replace("/\[color=#([0-9a-f]{3}|[0-9a-f]{6})](.*?)\[\/color]/i", "$2", $text);
330 $text = preg_replace_callback("/\[ICON\=([^\]]*)\]/i", Array('\Bitrix\Im\Text', 'modifyIcon'), $text);
331 $text = preg_replace_callback('/\[TIMESTAMP=(\d+) FORMAT=([^\]]*)\]/i', [__CLASS__, 'modifyTimestampCode'], $text);
332 $text = preg_replace('#\-{54}.+?\-{54}#s', " [".Loc::getMessage('IM_QUOTE')."] ", str_replace(array("#BR#"), Array(" "), $text));
333 $text = trim($text);
334
335 if ($withFile)
336 {
337 $text .= " [".Loc::getMessage('IM_MESSAGE_FILE')."]";
338 }
339
340 $text = trim($text);
341
342 if ($text == '')
343 {
344 $text = Loc::getMessage('IM_MESSAGE_DELETE');
345 }
346
347 return $text;
348 }
349
350 public static function populateUserBbCode(string $text): string
351 {
352 return preg_replace_callback("/\[USER=([0-9]{1,})\]\[\/USER\]/i", static function($matches){
353 $userId = $matches[1];
354 $userName = \Bitrix\Im\User::getInstance($userId)->getFullName(false);
355 return '[USER='.$userId.' REPLACE]'.$userName.'[/USER]';
356 }, $text);
357 }
358
359 public static function modifyTimestampCode(array $matches): string
360 {
361 $timestamp = (int)($matches[1] ?? 0);
362 $date = DateTime::createFromTimestamp($timestamp);
363 $format = $matches[2] ?? '';
364 $formatCode = DateFormat::tryFrom($format);
365 if ($formatCode === null)
366 {
367 return $matches[0];
368 }
369
370 return Timestamp::build($date, $formatCode)->toPlain();
371 }
372
373 public static function encodeEmoji($text)
374 {
375 return \Bitrix\Main\Text\Emoji::encode($text);
376 }
377
378 public static function decodeEmoji($text)
379 {
380 return \Bitrix\Main\Text\Emoji::decode($text);
381 }
382
383 public static function getEmoji($code, $fallbackText = '')
384 {
385 if (!isset(self::$emojiList[$code]))
386 {
387 return $fallbackText;
388 }
389
390 return self::decodeEmoji(self::$emojiList[$code]);
391 }
392
393 public static function getEmojiList(): ?array
394 {
395 return array_map(fn ($element) => self::decodeEmoji($element), self::$emojiList);
396 }
397
398 public static function convertHtmlToBbCode($html)
399 {
400 if (!is_string($html))
401 {
402 return $html;
403 }
404
405 $html = str_replace('&nbsp;', ' ', $html);
406 $html = str_replace('<hr>', '------[BR]', $html);
407 $html = str_replace('#BR#', '[BR]', $html);
408
409 $replaced = 0;
410 do
411 {
412 $html = preg_replace(
413 "/<([busi])[^>a-z]*>(.+?)<\\/(\\1)[^>a-z]*>/isu",
414 "[\\1]\\2[/\\1]",
415 $html, -1, $replaced
416 );
417 }
418 while($replaced > 0);
419
420 $html = preg_replace("/\\<br\s*\\/*\\>/isu","[br]", $html);
421 $html = preg_replace(
422 [
423 "#<a[^>]+href\\s*=\\s*('|\")(.+?)(?:\\1)[^>]*>(.*?)</a[^>]*>#isu",
424 "#<a[^>]+href(\\s*=\\s*)([^'\">]+)>(.*?)</a[^>]*>#isu"
425 ],
426 "[url=\\2]\\3[/url]", $html
427 );
428 $html = preg_replace(
429 ["/<font[^>]+color\s*=[\s'\"]*#([0-9a-f]{3}|[0-9a-f]{6})[\s'\"]*>(.+?)<\/font[^>]*>/iu"],
430 ["[color=#\\1]\\2[/color]"],
431 $html
432 );
433 $html = preg_replace(
434 ["/<span[^>]+color\s*=[\s'\"]*#([0-9a-f]{3}|[0-9a-f]{6})[\s'\"]*>(.+?)<\/span[^>]*>/iu"],
435 ["[color=#\\1]\\2[/color]"],
436 $html
437 );
438 $html = preg_replace(
439 ["/<font[^>]+size\s*=[\s'\"]*(\d+)[\s'\"]*>(.+?)<\/font[^>]*>/iu"],
440 ["[size=\\1]\\2[/size]"],
441 $html
442 );
443
444 $replaced = 0;
445 do
446 {
447 $html = preg_replace(
448 "/<div(?:.*?)>(.*?)<\/div>/iu",
449 "\\1",
450 $html, -1, $replaced
451 );
452 }
453 while($replaced > 0);
454
455 $replaced = 0;
456 do
457 {
458 $html = preg_replace(
459 "/<span(?:.*?)>(.*?)<\/span>/iu",
460 "\\1",
461 $html, -1, $replaced
462 );
463 }
464 while($replaced > 0);
465
466 $html = preg_replace(
467 "/<font(?:.*?)>(.*?)<\/font>/iu",
468 "\\1",
469 $html
470 );
471
472 return $html;
473 }
474
475 public static function modifyIcon($params)
476 {
477 $text = $params[1];
478
479 $title = Loc::getMessage('IM_MESSAGE_ICON');
480
481 preg_match('/title\=(.*[^\s\]])/i', $text, $match);
482 if ($match)
483 {
484 $title = $match[1];
485 if (mb_strpos($title, 'width=') !== false)
486 {
487 $title = mb_substr($title, 0, mb_strpos($title, 'width='));
488 }
489 if (mb_strpos($title, 'height=') !== false)
490 {
491 $title = mb_substr($title, 0, mb_strpos($title, 'height='));
492 }
493 if (mb_strpos($title, 'size=') !== false)
494 {
495 $title = mb_substr($title, 0, mb_strpos($title, 'size='));
496 }
497 $title = trim($title);
498 }
499
500 return '('.$title.')';
501 }
502
503 public static function modifySendPut($params)
504 {
505 $code = mb_strpos(mb_strtoupper($params[0]), '[SEND') === 0? 'SEND': 'PUT';
506 return preg_replace("/\[$code(?:=(.+))?\](.+?)?\[\/$code\]/i", "$2", $params[0]);
507 }
508
509 public static function getSaveModificator()
510 {
511 return [
512 [__CLASS__, 'extendedEncodeEmoji']
513 ];
514 }
515
516 public static function getFetchModificator()
517 {
518 return [
519 [__CLASS__, 'extendedDecodeEmoji']
520 ];
521 }
522
523 public static function extendedEncodeEmoji($text)
524 {
525 return isset($text) ? self::encodeEmoji($text) : null;
526 }
527
528 public static function extendedDecodeEmoji($text)
529 {
530 return isset($text) ? self::decodeEmoji($text) : null;
531 }
532
533 public static function convertSymbolsAfterJsonDecode($data)
534 {
535 $search = ["\\n", "\\t", '\\"', "\\\\"];
536 $replace = ["\n", "\t", '"', "\\"];
537
538 if (is_string($data))
539 {
540 return str_replace($search, $replace, $data);
541 }
542
543 if (is_array($data))
544 {
545 foreach ($data as $key => $value)
546 {
547 $data[$key] = self::convertSymbolsAfterJsonDecode($value);
548 }
549 }
550
551 return $data;
552 }
553
554 public static function filterUserBbCodes(string $text, int $currentUserId): string
555 {
556 $pattern = "/\[USER=(\d+)(?: REPLACE)?](.*?)\[\/USER]/is";
557
558 do
559 {
560 $previousText = $text;
561 $text = preg_replace_callback($pattern, function ($matches) use($currentUserId) {
562 return self::replaceUserBbCodeByAccess($matches, $currentUserId);
563 }, $text);
564 }
565 while ($previousText !== $text);
566
567 return $text;
568 }
569
570 private static function replaceUserBbCodeByAccess($matches, int $currentUserId): string
571 {
572 $userId = $matches[1];
573
574 $currentUser = \Bitrix\Im\V2\Entity\User\User::getInstance($currentUserId);
575 $result = $currentUser->checkAccess((int)$userId);
576
577 if ($result->isSuccess())
578 {
579 return $matches[0] ?? '';
580 }
581
582 return $matches[2] ?? '';
583 }
584}
$count
Определения admin_tab.php:4
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
static getPublicDomain()
Определения common.php:8
static extendedEncodeEmoji($text)
Определения text.php:523
static modifyIcon($params)
Определения text.php:475
static getFetchModificator()
Определения text.php:516
static parse($text, $params=Array())
Определения text.php:28
static recoverReplacements($text)
Определения text.php:270
static modifySendPut($params)
Определения text.php:503
static populateUserBbCode(string $text)
Определения text.php:350
static convertSymbolsAfterJsonDecode($data)
Определения text.php:533
static extendedDecodeEmoji($text)
Определения text.php:528
static filterUserBbCodes(string $text, int $currentUserId)
Определения text.php:554
static encodeEmoji($text)
Определения text.php:373
static setReplacement($match)
Определения text.php:261
static modifyTimestampCode(array $matches)
Определения text.php:359
static getSaveModificator()
Определения text.php:509
static getDateConverterParams($text)
Определения text.php:219
static convertHtmlToBbCode($html)
Определения text.php:398
static getEmojiList()
Определения text.php:393
static parseLegacyFormat($text, $params=Array())
Определения text.php:94
static getEmoji($code, $fallbackText='')
Определения text.php:383
static modifyShortUserTag($matches)
Определения text.php:292
static isOnlyEmoji($text)
Определения text.php:233
static removeBbCodes($text, $withFile=false, $attachValue=false)
Определения text.php:299
static getReplaceMap($text)
Определения text.php:177
static decodeEmoji($text)
Определения text.php:378
static getInstance($userId=null)
Определения user.php:45
static getInstance(?int $id)
Определения User.php:72
$data['IS_AVAILABLE']
Определения .description.php:13
</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
$formatCode
Определения options.php:112
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
Определения tools.php:2701
Определения base32.php:2
if(empty($signedUserToken)) $key
Определения quickway.php:257
$text
Определения template_pdf.php:79
else $userName
Определения order_form.php:75
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799
$title
Определения pdf.php:123
if(!Loader::includeModule('sale')) $pattern
Определения index.php:20
$matches
Определения index.php:22