定制 nc/faye-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nc/faye-client

最新稳定版本:v1.1.1

Composer 安装命令:

composer require nc/faye-client

包简介

Php client for interacting with faye server

README 文档

README

Build Status

PHP 5.3+ library to push message to a faye server.

http://faye.jcoglan.com/

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

GitHub 信息

  • Stars: 27
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-07-29