Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
StatusResolver.php
1<?php
2
4
6
8{
9
10 public function resolveStatus(string $serviceStatus): ?int
11 {
12 $serviceStatus = mb_strtolower($serviceStatus);
13 switch ($serviceStatus)
14 {
15 case 'read':
17 case 'sent':
19 case 'enqueued':
21 case 'delayed':
23 case 'delivered':
25 case 'undelivered':
27 case 'failed':
28 case 'cancelled':
29 case 'expired':
30 case 'no-match-template':
32 default:
33 return mb_strpos($serviceStatus, 'error') === 0 ? MessageStatus::ERROR : MessageStatus::UNKNOWN;
34 }
35 }
36}