PHPSDK
Public 成员函数 | 所有成员列表
Easemob\Push类 参考

Public 成员函数

 updateUserNickname ($username, $nickname)
 设置推送昵称 更多...
 
 setNotificationDisplayStyle ($username, $notification_display_style=1)
 设置推送消息展示方式 更多...
 
 openNotificationNoDisturbing ($username, $startTime, $endTime)
 设置推送免打扰 更多...
 
 closeNotificationNoDisturbing ($username)
 取消推送免打扰 更多...
 

详细描述

Push 用来管理用户推送(设置推送免打扰等)

成员函数说明

◆ closeNotificationNoDisturbing()

Easemob\Push::closeNotificationNoDisturbing (   $username)

取消推送免打扰

参数
string$username用户名
返回
boolean|array 成功或者错误

◆ openNotificationNoDisturbing()

Easemob\Push::openNotificationNoDisturbing (   $username,
  $startTime,
  $endTime 
)

设置推送免打扰

设置用户免打扰,在免打扰期间,用户将不会收到离线消息推送。

参数
string$username用户名
int$startTime免打扰起始时间,单位是小时,例如 8 代表每日 8:00 开启免打扰
int$endTime免打扰结束时间,单位是小时,例如 18 代表每日 18:00 关闭免打扰
返回
boolean|array 成功或者错误

◆ setNotificationDisplayStyle()

Easemob\Push::setNotificationDisplayStyle (   $username,
  $notification_display_style = 1 
)

设置推送消息展示方式

设置推送消息至客户端的方式,修改后及时有效。服务端对应不同的设置,向用户发送不同展示方式的消息。

参数
string$username用户名
int$notification_display_style消息提醒方式,0:仅通知;1:通知以及消息详情;
返回
boolean|array 成功或者错误

◆ updateUserNickname()

Easemob\Push::updateUserNickname (   $username,
  $nickname 
)

设置推送昵称

设置用户的推送昵称,在离线推送时使用。

参数
string$username用户名
string$nickname要设置的推送昵称
返回
boolean|array 成功或者错误