Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
buildermessagefromdatamanager.php
1<?php
2
4
6use Bitrix\Calendar\Internals\EO_QueueMessage;
7
9{
10 private EO_QueueMessage $data;
11
12 public function __construct(EO_QueueMessage $data)
13 {
14 $this->data = $data;
15 }
16
20 public function build(): ?Message
21 {
22 $message = $this->data->getMessage();
23 return (new Message())
24 ->setId($this->data->getId())
25 ->setBody($message[Dictionary::MESSAGE_PARTS['body']] ?? [])
26 ->setHeaders($message[Dictionary::MESSAGE_PARTS['headers']] ?? [])
27 ->setProperties($message[Dictionary::MESSAGE_PARTS['properties']] ?? [])
28 ;
29 }
30}