1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace components\service;
- class AmqpConfig
- {
- public $host = '127.0.0.1';
- public $port = 5672;
- public $user = 'guest';
- public $pass = 'Guest';
- public $vhost = '/';
- public $api_port = '15672';
- /* status */
- const STATUS_SEND_OK = 1;//已发送,待处理
- const STATUS_HAND = 2;//处理中
- const STATUS_HAND_OK = 10;//处理成功
- const STATUS_HAND_FAIL = 11;//处理失败
- public static $statusMark = [
- 0 => '未知状态',
- 1 => '已发送,待处理',
- 2 => '处理中',
- 10 => '处理成功',
- 11 => '处理失败',
- ];
- public static function getMarkById($id)
- {
- if (isset(self::$statusMark[$id]) && is_numeric($id)) {
- return self::$statusMark[$id];
- }
- return self::$statusMark[0];
- }
- }
|