Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
status.php
1<?php
3
5
6class Status
7{
8 public const QUEUED = 0;
9 public const EXECUTING = 1;
10 public const FAULT = 2;
11 public const TERMINATED = 3;
12 public const COMPLETED = 4;
13
14 public static function getLabel(int $status)
15 {
16 switch ($status)
17 {
18 case static::QUEUED:
19 return Loc::getMessage('BIZPROC_SCRIPT_QUEUE_STATUS_QUEUED');
20 case static::EXECUTING:
21 return Loc::getMessage('BIZPROC_SCRIPT_QUEUE_STATUS_EXECUTING');
22 case static::FAULT:
23 return Loc::getMessage('BIZPROC_SCRIPT_QUEUE_STATUS_FAULT');
24 case static::TERMINATED:
25 return Loc::getMessage('BIZPROC_SCRIPT_QUEUE_STATUS_TERMINATED');
26 case static::COMPLETED:
27 return Loc::getMessage('BIZPROC_SCRIPT_QUEUE_STATUS_COMPLETED');
28 }
29
30 return 'unknown';
31 }
32}
static getLabel(int $status)
Definition status.php:14
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29