Files
tougao/application/common/mq/RabbitMqConfig.php
2026-06-02 10:00:36 +08:00

25 lines
442 B
PHP

<?php
namespace app\common\mq;
class RabbitMqConfig
{
public static function get($key = null, $default = null)
{
$cfg = config('rabbitmq');
if (!is_array($cfg)) {
$cfg = [];
}
if ($key === null) {
return $cfg;
}
return isset($cfg[$key]) ? $cfg[$key] : $default;
}
public static function referenceCheck()
{
$rc = self::get('reference_check', []);
return is_array($rc) ? $rc : [];
}
}