betsuno/yii2-centrifugo
最新稳定版本:0.1
Composer 安装命令:
composer require betsuno/yii2-centrifugo
包简介
Centrifugo component for Yii2 framework
README 文档
README
There is a wrapper for Centrifugo client based on PHPCent
Installation
Run command in shell
> php composer.phar require "betsuno/yii2-centrifugo"
or add this line in to the require section of the composer.json file in your project
"betsuno/yii2-centrifugo": "*"
Setup
Add into your config file as following
'components' => [ ... 'centrifugo' => [ 'class' => 'yii2\centrifugo\Client', 'host' => 'http://localhost:8000', 'secret' => 'very-long-secret-key', // also you can specify your own transport class as below 'transport' => [ 'class' => 'your\transport\ClassName', ... ] ], ... ]
Usage
Yii::$app->centrifugo->publish('test', ['message' => 'hello world']);
统计信息
- 总下载量: 6.91k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-16