eee
This commit is contained in:
@@ -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'] ?? '');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user