alxmsl/mpns
Composer 安装命令:
composer require alxmsl/mpns
包简介
Client for Microsoft Push Notification Service (MPNS)
README 文档
README
Client for Microsoft Push Notification Service (MPNS) on PHP
Toast notification example
use alxmsl\MPNS\Client;
use alxmsl\MPNS\Message\ToastMessage;
$Message = new ToastMessage();
$Message->setTitle('text1')
->setContent('text2')
->setParam('aaa')
->setSound('sound')
->setIsSilent(true);
$channelUrl = 'http://sn1.notify.live.net/throttledthirdparty/01.00/ASDWEWRWEDFDFDfdfdfdfFE3feeD444343';
$Client = new Client();
$Client->send($channelUrl, $Message);
Tile notification example
use alxmsl\MPNS\Client;
use alxmsl\MPNS\Message\TileMessage;
$Message = new TileMessage();
//@todo: here you can initialize tile fileds use TileMessage setters
$channelUrl = 'http://sn1.notify.live.net/throttledthirdparty/01.00/ASDWEWRWEDFDFDfdfdfdfFE3feeD444343';
$Client = new Client();
$Client->send($channelUrl, $Message);
Raw tile notification example
use alxmsl\MPNS\Client;
use alxmsl\MPNS\Message\RawTileMessage;
$Message = new RawTileMessage();
// Here is raw fields initialization
$Message->aaa = 'bbb';
$channelUrl = 'http://sn1.notify.live.net/throttledthirdparty/01.00/ASDWEWRWEDFDFDfdfdfdfFE3feeD444343';
$Client = new Client();
$Client->send($channelUrl, $Message);
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: WTFPL
- 更新时间: 2014-08-03