- 按 docs/renew-code-comment.md 将 PHP 文件头改为带边框的 Author 注释\n- 注释中的 crmeb.com 替换为 uj345.cn(代码字符串中的外链未改)\n- 新增 docs/renew-code-comment.md 说明 Made-with: Cursor
52 lines
971 B
PHP
52 lines
971 B
PHP
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | Author: ScottPan Team
|
|
// +----------------------------------------------------------------------
|
|
|
|
namespace crmeb\services\wechat\message;
|
|
|
|
/**
|
|
* text消息
|
|
* Class Text
|
|
* @author 等风来
|
|
* @email 136327134@qq.com
|
|
* @date 2023/9/14
|
|
* @package crmeb\services\wechat\message
|
|
*/
|
|
class Text extends Message
|
|
{
|
|
/**
|
|
* Message type.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected string $type = 'text';
|
|
|
|
/**
|
|
* Properties.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected array $properties = ['content'];
|
|
|
|
/**
|
|
* Text constructor.
|
|
*
|
|
* @param string $content
|
|
*/
|
|
public function __construct(string $content = '')
|
|
{
|
|
parent::__construct(compact('content'));
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public function toXmlArray(): array
|
|
{
|
|
return [
|
|
'Content' => $this->get('content'),
|
|
];
|
|
}
|
|
}
|