1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
RecentType.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Recent;
4
5use Bitrix\Im\V2\Chat;
6use JsonSerializable;
7
8enum RecentType: string
9 implements JsonSerializable
10{
11 case User = 'user';
12 case Chat = 'chat';
13
14 public static function tryFromChatType(string $chatType): self
15 {
16 return match ($chatType)
17 {
18 Chat::IM_TYPE_PRIVATE => self::User,
19 default => self::Chat,
20 };
21 }
22
23 public function jsonSerialize(): string
24 {
25 return $this->value;
26 }
27}
RecentType
Определения RecentType.php:10
@ tryFromChatType
Определения RecentType.php:14