2017 © Pedro Peláez
 

library dnode-php-sync-client

Minimalistic dnode client for PHP

image

uuf6429/dnode-php-sync-client

Minimalistic dnode client for PHP

  • Saturday, January 27, 2018
  • by uuf6429
  • Repository
  • 1 Watchers
  • 0 Stars
  • 874 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

DNode PHP Sync Client

Build Status (TravisCI) Minimum PHP Version License Packagist, (*1)

Minimalistic dnode client for PHP, supports only synchronous calling of methods on remote server., (*2)

  • It can call method on remote dnode server and it can receive response.
  • It does not support any other callbacks.
  • It does not support full dnode-protocol - response from remote server must not contain any callbacks or links section.

Look at dnode-php for a more complex support of dnode protocol., (*3)

Table Of Contents

Installation

The recommended and easiest way to install Rune is through Composer:, (*4)

composer require uuf6429/dnode-php-sync-client "~2.0"

Usage

Let's first start with a simple node.js server exposing echo method over dnode:, (*5)

var dnode = require('dnode');
var port = process.argv[2] || 8080;

dnode({
  echo: function (data, callback) {
    callback(null, data);
  }
}).listen(port);

Now, we can call this echo method from PHP like this:, (*6)

<?php

require_once 'vendor/autoload.php';

$dnode = new \uuf6429\DnodeSyncClient\Dnode();
$connection = $dnode->connect('localhost', 8080);
$response = $connection->call('echo', ['Hello, world!']);

var_dump($response);

Result:, (*7)

array(2) {
  [0] =>
  NULL
  [1] =>
  string(13) "Hello, world!"
}

Run tests

To run all tests, just run ./vendor/bin/phpunit from the main directory., (*8)

Note: tests/DnodeTest.php is an integration test which needs dnode echo server running. Sources for this test server are in tests/node directory., (*9)

The test suite will automatically install npm dependencies and start the echo service on port 8080 when necessary., (*10)

The Versions

27/01 2018

dev-master

9999999-dev https://github.com/uuf6429/dnode-php-sync-client

Minimalistic dnode client for PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.6

 

The Development Requires

by Erasys GmbH

php dnode erasys

27/01 2018

2.1.0

2.1.0.0 https://github.com/uuf6429/dnode-php-sync-client

Minimalistic dnode client for PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.6

 

The Development Requires

by Erasys GmbH

php dnode erasys

27/01 2018

dev-Minor-update

dev-Minor-update https://github.com/uuf6429/dnode-php-sync-client

Minimalistic dnode client for PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.6

 

The Development Requires

by Erasys GmbH

php dnode erasys

12/06 2017

2.0.1

2.0.1.0 https://github.com/uuf6429/dnode-php-sync-client

Minimalistic dnode client for PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.5

 

The Development Requires

by Erasys GmbH

php dnode erasys

22/04 2017

2.0.0

2.0.0.0 https://github.com/uuf6429/dnode-php-sync-client

Minimalistic dnode client for PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.5

 

The Development Requires

by Erasys GmbH

php dnode erasys

16/10 2014

1.0.2

1.0.2.0 https://github.com/erasys/dnode-php-sync-client

Minimalistic dnode client for PHP

  Sources   Download

proprietary

The Requires

  • php >=5.3.0

 

by Erasys GmbH

php dnode erasys

16/10 2014

1.0.1

1.0.1.0 https://github.com/erasys/dnode-php-sync-client

Minimalistic dnode client for PHP

  Sources   Download

proprietary

The Requires

 

by Erasys GmbH

php dnode erasys