This commit is contained in:
2026-03-17 16:55:45 +08:00
parent 2f469d6b60
commit 0a535c3a89
3 changed files with 246 additions and 207 deletions
+35
View File
@@ -0,0 +1,35 @@
<?php
namespace wchat\common;
class NoticeConfig
{
public string $token;
public string $encodingAESKey;
public string $unionId;
/**
* @param string $token
* @param string $encodingAESKey
* @param string $unionId
*/
public function __construct(string $token, string $encodingAESKey, string $unionId)
{
$this->token = $token;
$this->encodingAESKey = $encodingAESKey;
$this->unionId = $unionId;
}
/**
* @param array $map
* @return static
*/
public static function parse(array $map): static
{
return new static($map['token'], $map['secret'], $map['unionId'] ?? '');
}
}