1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
registry.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\Call;
4
5use Bitrix\Im\Model\CallTable;
6use Bitrix\Im\V2\Call\CallFactory;
7
9{
11 protected static array $calls = [];
12
17 public static function getCallWithId(int $id): ?Call
18 {
19 if (static::$calls[$id] instanceof Call)
20 {
21 return static::$calls[$id];
22 }
23
24 $row = CallTable::getRowById($id);
25 if (!$row)
26 {
27 return null;
28 }
29
30 static::$calls[$id] = CallFactory::createWithArray($row['PROVIDER'], $row);
31
32 return static::$calls[$id];
33 }
34
39 public static function getCallWithUuid(string $uuid): ?Call
40 {
41 foreach (static::$calls as $call)
42 {
43 if ($call instanceof Call && $call->getUuid() === $uuid)
44 {
45 return $call;
46 }
47 }
48 $row = CallTable::getList([
49 'select' => ['*'],
50 'filter' => ['=UUID' => $uuid],
51 'limit' => 1,
52 ])->fetch();
53 if (!$row)
54 {
55 return null;
56 }
57
58 static::$calls[$row['ID']] = CallFactory::getCallInstance($row['PROVIDER'], $row);
59
60 return static::$calls[$row['ID']];
61 }
62}
Определения call.php:24
getUuid()
Определения call.php:485
static array $calls
Определения registry.php:11
static getCallWithId(int $id)
Определения registry.php:17
static getCallWithUuid(string $uuid)
Определения registry.php:39
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804