exls/socket.io-emitter
最新稳定版本:v0.1.0
Composer 安装命令:
composer require exls/socket.io-emitter
包简介
PHP socket.io emitter
README 文档
README
A PHP implementation of socket.io-emitter (0.1.0).
Installation
composer require exls/socket.io-emitter
Usage
Emit payload message
use Predis; use Exls\SocketIO; ... $client = new Predis\Client(); (new Emitter($client)) ->of('namespace')->emit('event', 'payload message');
Flags
Possible flags
- json
- volatile
- broadcast
To use flags, just call it like in example bellow
use Predis; use Exls\SocketIO; ... $client = new Predis\Client(); (new Emitter($client)) ->broadcast->emit('broadcast-event', 'payload message');
Emit an object
use Predis; use Exls\SocketIO; ... $client = new Predis\Client(); (new Emitter($client)) ->emit('broadcast-event', ['param1' => 'value1', 'param2' => 'value2', ]);
统计信息
- 总下载量: 39.97k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-05-01