nesquick/trafficcophp 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

nesquick/trafficcophp

最新稳定版本:v0.2

Composer 安装命令:

composer require nesquick/trafficcophp

包简介

PHP Client for Traffic Cop messsage queue.

README 文档

README

Build Status

This is the official PHP client for TrafficCop. It provides a very simple client for basic usage but offers also very OO-Style usage. Just see examples for that.

Install

Installation should be done via composer.

{
    "require": {
        "nesQuick/TrafficCophp": "dev-master"
    }
}

Example

You should have a look into the examples folder. A simple usage example could look like this

<?php

require __DIR__ . '/../vendor/.composer/autoload.php';

use TrafficCophp\Client;

$client = new Client('127.0.0.1', 3542);
$client->publish('channel_two', 'A little test message from php client example');

$client->subscribe('channel_one', 'channel_two', 'channel_three');

while (true) {
	$client->receive(function($channel, $message) {
		printf('Got message "%s" on %s', $message, $channel);
	});
}

ToDo's

  • write php doc
  • cleanup use statements
  • refactor channel collection

License

Licensed under the MIT license.

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-04-07