Download the PHP package uuf6429/dnode-php-sync-client without Composer
On this page you can find all versions of the php package uuf6429/dnode-php-sync-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download uuf6429/dnode-php-sync-client
More information about uuf6429/dnode-php-sync-client
Files in uuf6429/dnode-php-sync-client
Package dnode-php-sync-client
Short Description Minimalistic dnode client for PHP
License BSD-3-Clause
Homepage https://github.com/uuf6429/dnode-php-sync-client
Informations about the package dnode-php-sync-client
DNode PHP Sync Client
Minimalistic dnode client for PHP, supports only synchronous calling of methods on remote server.
- 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.
Table Of Contents
- DNode PHP Sync Client
- Table Of Contents
- Installation
- Usage
- Run tests
Installation
The recommended and easiest way to install Rune is through Composer:
Usage
Let's first start with a simple node.js server exposing echo
method over dnode:
Now, we can call this echo method from PHP like this:
Result:
Run tests
To run all tests, just run ./vendor/bin/phpunit
from the main directory.
Note: tests/DnodeTest.php
is an integration test which needs dnode echo server running. Sources for this test server are in tests/node
directory.
The test suite will automatically install npm dependencies and start the echo service on port 8080 when necessary.