nc/faye-client
最新稳定版本:v1.1.1
Composer 安装命令:
composer require nc/faye-client
包简介
Php client for interacting with faye server
关键字:
README 文档
README
PHP 5.3+ library to push message to a faye server.
Instalation
via composer
{ "require": { "nc/faye-client": "~1.0", # if you want to use guzzle adapter "guzzle/guzzle": "~3.0" } }
Usage
$adapter = new \Nc\FayeClient\Adapter\CurlAdapter(); $client = new \Nc\FayeClient\Client($adapter, 'http://127.0.0.1/faye'); $client->send("/channel1", array("name" => "foo"), array("token" => "456454sdqd"));
Client Send method documentation
/** * Send message * @param string $channel message channel * @param array $data Data to send * @param array $ext Extra data */ public function send($channel, $data = array(), $ext = array());
Adapter to post JSON
* CurlAdapter : `Nc\FayeClient\Adapter\CurlAdapter`
* GuzzleAdapter : `Nc\FayeClient\Adapter\GuzzleAdapter`
Run test
php vendor/bin/atoum -D tests/ -bf tests/bootstrap.php
统计信息
- 总下载量: 182.8k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 27
- 点击次数: 1
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-07-29