$bear->server->push(function ($message) {
switch ($message['MsgType']) {
case 'event':
return '收到事件消息';
break;
case 'text':
return '收到文字消息';
break;
default:
return '收到其它消息';
break;
}
// TODO...
})
$response = $bear->server->serve();
$response->send();
$message = $server->getMessage();
$app->server->push(OtherHandler::class);
$app->server->push(...);