1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
eventconnection.php
См. документацию.
1<?php
2
3namespace Bitrix\Calendar\Sync\Connection;
4
5use Bitrix\Calendar\Core\Base\EntityInterface;
6use Bitrix\Calendar\Core\Event\Event;
7use Bitrix\Calendar\Internals\EventConnectionTable;
8use Bitrix\Main\ArgumentException;
9
11{
13 private int $version = 0;
15 private ?Event $event = null;
17 private string $vendorEventId = '';
19 private ?Connection $connection = null;
21 private string $lastSyncStatus = '';
23 private int $retryCount = 0;
25 private ?string $entityTag = null;
27 private ?array $data = null;
29 private ?string $recurrenceId = null;
31 private ?int $id = null;
33 private ?string $vendorVersionId = null;
34
40 public function setId(?int $id): EventConnection
41 {
42 $this->id = $id;
43
44 return $this;
45 }
46
50 public function getId(): ?int
51 {
52 return $this->id;
53 }
54
58 public function getEvent(): Event
59 {
60 return $this->event;
61 }
62
68 public function setEvent(Event $event): self
69 {
70 $this->event = $event;
71
72 return $this;
73 }
74
78 public function getVendorEventId(): string
79 {
80 return $this->vendorEventId;
81 }
82
87 public function setVendorEventId(string $vendorEventId): self
88 {
89 $this->vendorEventId = $vendorEventId;
90
91 return $this;
92 }
93
97 public function getConnection(): Connection
98 {
99 return $this->connection;
100 }
101
107 public function setConnection(Connection $connection): self
108 {
109 $this->connection = $connection;
110
111 return $this;
112 }
113
117 public function getLastSyncStatus(): string
118 {
119 return $this->lastSyncStatus;
120 }
121
127 public function setLastSyncStatus(string $lastSyncStatus): self
128 {
129 $this->lastSyncStatus = $lastSyncStatus;
130
131 return $this;
132 }
133
139 public function setRetryCount(int $retryCount = 0): EventConnection
140 {
141 $this->retryCount = $retryCount;
142
143 return $this;
144 }
145
149 public function getRetryCount(): int
150 {
151 return $this->retryCount;
152 }
153
157 public function getEntityTag(): ?string
158 {
159 return $this->entityTag;
160 }
161
165 public function getVendorVersionId(): ?string
166 {
167 return $this->vendorVersionId;
168 }
169
175 public function setVendorVersionId(?string $versionId): self
176 {
177 $this->vendorVersionId = $versionId;
178
179 return $this;
180 }
181
187 public function setEntityTag(?string $entityTag = null): self
188 {
189 $this->entityTag = $entityTag;
190
191 return $this;
192 }
193
198 public function setVersion(int $version): self
199 {
200 $this->version = $version;
201
202 return $this;
203 }
204
208 public function getVersion(): int
209 {
210 return $this->version;
211 }
212
213 public function getData(): ?array
214 {
215 return $this->data;
216 }
217
218 public function setData($data): EventConnection
219 {
220 $this->data = $data;
221
222 return $this;
223 }
224
225 public function fetchData(): ?array
226 {
227 if ($this->id <= 0)
228 {
229 return null;
230 }
231
232 try
233 {
234 $fetchDataResult = EventConnectionTable::query()
235 ->setSelect(['DATA'])
236 ->where('ID', $this->id)
237 ->fetch()
238 ;
239
240 return $fetchDataResult['DATA'] ?? null;
241 }
242 catch (ArgumentException $e)
243 {}
244
245 return null;
246 }
247
251 public function getEventVersion(): ?string
252 {
253 return $this->getVersion();
254 }
255
260 public function setRecurrenceId(?string $id): EventConnection
261 {
262 $this->recurrenceId = $id;
263
264 return $this;
265 }
266
270 public function getRecurrenceId(): ?string
271 {
272 return $this->recurrenceId;
273 }
274
275 public function upVersion()
276 {
277 $this->version++;
278 }
279}
$connection
Определения actionsdefinitions.php:38
xml version
Определения yandex.php:67
setLastSyncStatus(string $lastSyncStatus)
Определения eventconnection.php:127
setVendorVersionId(?string $versionId)
Определения eventconnection.php:175
setEntityTag(?string $entityTag=null)
Определения eventconnection.php:187
setVendorEventId(string $vendorEventId)
Определения eventconnection.php:87
setConnection(Connection $connection)
Определения eventconnection.php:107
$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
$event
Определения prolog_after.php:141