Skip to content

pprasse/phpnats

 
 

Repository files navigation

phpnats

Travis

  • Master: Build Status
  • Develop: Build Status

Coverage

  • Master: Coverage Status
  • Develop: Coverage Status

Introduction

A PHP client for the NATS messaging system.

Note: phpnats is under heavy development.

Requirements

Usage

Basic Usage

$client = new \Nats\Connection();
$client->connect();

# Simple Publisher
$client->publish("foo", "foo bar");

# Simple Subscriber
$callback = function($payload)
{
    printf("Data: %s\r\n", $payload);
};
$client->subscribe("foo", $callback);

# Wait for 1 message
$client->wait(1);

Developer's Information

Tests

Tests are in the tests folder. To run them, you need PHPUnit and execute make test.

Code Quality

We are using PHP Code Sniffer to ensure our code follow an high quality standard.

To perform an analysis of the code execute make cs.

Creators

Raül Pérez

Adrià Cidre

José Gil

Gorka López de Torre

License

MIT, see LICENSE

About

A PHP client for the NATS messaging system.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 94.9%
  • Makefile 5.1%