Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
EntityFactory.php
1
<?php
2
3
namespace
Bitrix\Im\V2\Sync\Entity
;
4
5
use
Bitrix\Im\V2\Sync\Event
;
6
7
class
EntityFactory
8
{
13
public
function
createEntities
(array $events): array
14
{
15
$messages =
new
Messages
();
16
$chats =
new
Chats
();
17
$pins =
new
PinMessages
();
18
19
foreach
($events as $event)
20
{
21
switch
($event->entityType)
22
{
23
case
Event::CHAT_ENTITY
:
24
$chats->add($event);
25
break
;
26
case
Event::MESSAGE_ENTITY
:
27
$messages->add($event);
28
break
;
29
case
Event::PIN_MESSAGE_ENTITY
:
30
$pins->add($event);
31
break
;
32
}
33
}
34
35
return
[$chats, $messages, $pins];
36
}
37
}
Bitrix\Im\V2\Sync\Entity\Chats
Definition
Chats.php:11
Bitrix\Im\V2\Sync\Entity\EntityFactory
Definition
EntityFactory.php:8
Bitrix\Im\V2\Sync\Entity\EntityFactory\createEntities
createEntities(array $events)
Definition
EntityFactory.php:13
Bitrix\Im\V2\Sync\Entity\Messages
Definition
Messages.php:11
Bitrix\Im\V2\Sync\Entity\PinMessages
Definition
PinMessages.php:11
Bitrix\Im\V2\Sync\Event
Definition
Event.php:9
Bitrix\Im\V2\Sync\Event\PIN_MESSAGE_ENTITY
const PIN_MESSAGE_ENTITY
Definition
Event.php:15
Bitrix\Im\V2\Sync\Event\MESSAGE_ENTITY
const MESSAGE_ENTITY
Definition
Event.php:16
Bitrix\Im\V2\Sync\Event\CHAT_ENTITY
const CHAT_ENTITY
Definition
Event.php:14
Bitrix\Im\V2\Sync\Entity
Definition
Chats.php:3
modules
im
lib
V2
Sync
Entity
EntityFactory.php
Создано системой
1.10.0