💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 文本消息类 TextMessage **目录 (Table of Contents)** [TOC] ## 类基本信息 **类简要描述:** - 微信文本消息,用于接收微信客户端发送到服务器来的和回复文本消息给微信客户端 **类名字空间:** - endor/wechat/message **类成员变量说明:** |成员变量|类型|访问修饰|说明 |:---- |:---|:----- |----- | |$_content | string | protected | 消息内容 | **类继承关系:** TextMessage -> Message ## 类成员函数/方法 ### __construct($platform, $user, $timestamp, $msgId ,$content) + 参数列表: |参数名|类型|必填项|说明 |:---- |:---|:----- |----- | |$platform| string | 是 | 微信公众号 ID | |$user| string | 是 | 用户ID | |$timestamp|int 是 | 时间戳 | |$msgId| string | 是 | 本次消息的ID | |$content | string | 是 | 本次消息的内容 | + 返回值: `无` + 函数说明: `构造函数` ### setContent($content) + 参数列表: |参数名|类型|必填项|说明 |:---- |:---|:----- |----- | |$content| string | 是 | 设置的微信消息的内容 | + 返回值: `无` + 函数说明: `设置该消息的文本内容` ### getContent() + 参数列表: `无` + 返回值: `无` + 函数说明: `获取该消息的文本内容` ### response() + 参数列表: `无` + 返回值: `无` + 函数说明: `发送消息`