MQTT 管理客户端

This commit is contained in:
2025-05-07 10:51:21 +08:00
commit 5eefef9b19
9 changed files with 532 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
<?php
namespace cn\com\maiyoule\mqttclient\response;
class BizResponse
{
private int $code;
private string $message;
private $data;
/**
* @param int $code
* @param string $message
* @param $data
*/
public function __construct(int $code = -1, string $message = '', $data = [])
{
$this->code = $code;
$this->message = $message;
$this->data = $data;
}
public function isSuccess(): bool
{
return $this->code == 1;
}
public function getCode(): int
{
return $this->code;
}
public function setCode(int $code): void
{
$this->code = $code;
}
public function getMessage(): string
{
return $this->message;
}
public function setMessage(string $message): void
{
$this->message = $message;
}
/**
* @return mixed
*/
public function getData()
{
return $this->data;
}
/**
* @param mixed $data
*/
public function setData($data): void
{
$this->data = $data;
}
}