Download the PHP package deepstreamhub/deepstream.io-client-php without Composer
On this page you can find all versions of the php package deepstreamhub/deepstream.io-client-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download deepstreamhub/deepstream.io-client-php
More information about deepstreamhub/deepstream.io-client-php
Files in deepstreamhub/deepstream.io-client-php
Package deepstream.io-client-php
Short Description the php client for deepstreamHub
License Apache-2.0
Homepage https://github.com/deepstreamIO/deepstream.io-client-php
Informations about the package deepstream.io-client-php
LOOKING FOR MAINTAINER
This library is no longer being maintained by deepstream core. Looking for a maintainer we can transfer this to, or add contributor rights to.
deepstream.io-client-php
PHP Client using the dsh HTTP API
Installing & running tests
Running the tests is a bit trickier as it requires a two-node deepstream cluster, consisting of a Websocket deepstream with a test-provider that answers RPCs and listens for events and a HTTP deepstream that the actual tests are run against:
- Install PHP - you can get it from e.g. http://windows.php.net/download/ for windows
- Add the folder with the executables (e.g. php.exe, php-cli.exe) to your path
- Download PHP Unit from https://phpunit.de/
- Move the
phpunit-6.2.1.phar
file to yourdeepstream.io-client-php
folder -
Make it executable via
- Download a local version of Redis and run it on its default port
- Download the latest deepstream version and unzip it
- run
git clone [email protected]:deepstreamIO/dsx-connection-http.git
in its lib directory - install the plugin via
yarn install
- copy the configs in
ds-conf
into your deepstream's conf directory - install the redis msg connector using
./deepstream.exe install msg redis
- start two deepstream instances with
and
-
install the test provider in the
deepstream.io-client-php
-
run the test provider
- run the tests using
If it all works it looks like this
API
new DeepstreamClient( $url, $authData )
Creates the deepstream client
setRecord( $recordName, [$path], $data )
Writes full or partial data to a record
$client->getRecord( $recordName )
Reads the data for a given record
$client->deleteRecord( $recordName )
Deletes a record
$client->getRecordVersion( $recordName )
Retrieves the current version of a record
$client->makeRpc( $rpcName, [$data] )
Executes a Remote Procedure Call
$client->emitEvent( $eventName, [$data] )
Emits an event
$client->startBatch()
Starts a set of batch operations that will be executed as a single request
$client->executeBatch()
Executes an existing set of batch operations