\Events

Summary

Methods
Properties
Constants
onMessage()
onClose()
No public properties found
No constants found
recallOrSRemMessage()
getRobotMessage()
getUserLists()
getWeather()
getHisChatMessage()
$db
$chat
$redisUsers
$sysRobot
N/A
No private methods found
No private properties found
N/A

Properties

$db

$db : 

Type

$chat

$chat : 

Type

$redisUsers

$redisUsers : 

Type

$sysRobot

$sysRobot : array<mixed,string>

Type

array<mixed,string>

Methods

onMessage()

onMessage(  $from_client_id,   $message) : boolean

有消息时

Parameters

$from_client_id

//workerman 生成的client_id

$message

Throws

\Exception|boolean

Returns

boolean

onClose()

onClose(  $client_id) 

当客户端断开连接时

Parameters

$client_id

//客户端id

Throws

\Exception

recallOrSRemMessage()

recallOrSRemMessage(  $message_data,   $clients_list) 

todo:消息撤回删除

Parameters

$message_data
$clients_list

getRobotMessage()

getRobotMessage(  $room_id) 

todo:自动回复消息

Parameters

$room_id

getUserLists()

getUserLists(  $redisUser) : array

todo:获取管理员列表

Parameters

$redisUser

Returns

array

getWeather()

getWeather(  $adCode) : boolean|mixed|string

todo:获取当前城市天气

Parameters

$adCode

Returns

boolean|mixed|string

getHisChatMessage()

getHisChatMessage(  $redisMessage,   $message) : false|mixed|string|null

todo:获取历史记录(数据库查询数据)

Parameters

$redisMessage
$message

Returns

false|mixed|string|null