AbleCloud PHP SDK  1.8.x
PHP SDK of AbleCloud API
Public 成员函数 | 所有成员列表
ACNotificationMgr类 参考
类 ACNotificationMgr 继承关系图:
Inheritance graph
[图例]
ACNotificationMgr 的协作图:
Collaboration graph
[图例]

Public 成员函数

 __construct ($name, $version, $context)
 
 notifyDeviceUsers ($deviceId, $notification, $toUsers)
 
 notifyUsers ($notification, $toUsers)
 
- Public 成员函数 继承自 ACService
 __construct ($name, $version, $context)
 
 getName ()
 
 getVersion ()
 
 getContext ()
 
 getLastError ()
 

额外继承的成员函数

- Protected 成员函数 继承自 ACService
 resetLastError ($errCode=0, $errMessage='')
 

详细描述

AbleCloud消息推送服务。 消息推送服务仅适用于推送给APP用户。

构造及析构函数说明

◆ __construct()

ACNotificationMgr::__construct (   $name,
  $version,
  $context 
)

构造函数。

参数
$namestring 消息推送服务的名字。
$versionint 消息推送服务的版本。
$contextACContext ACContext对象,表示访问该远程服务所依赖的环境信息。

成员函数说明

◆ notifyDeviceUsers()

ACNotificationMgr::notifyDeviceUsers (   $deviceId,
  $notification,
  $toUsers 
)

向设备的用户推送消息。

参数
$deviceId目标设备的逻辑ID。
$notificationACNotification对象,表示要被推送的消息。
$toUsers整数。0表示向设备的所有用户推送该消息;1表示向设备的管理员推送该消息。
返回
操作成功时返回TRUE;操作失败时返回FALSE,并且可调用getLastError()方法获取错误消息。

◆ notifyUsers()

ACNotificationMgr::notifyUsers (   $notification,
  $toUsers 
)

向用户推送消息。

参数
$notification要推送的消息。
$toUsers整数的数组,是消息推送的目标用户ID的集合。
返回
操作成功时返回TRUE;操作失败时返回FALSE,并且可调用getLastError()方法获取错误消息。

该类的文档由以下文件生成: