2017 © Pedro Peláez
 

library meteor-ddp-php

DDP client for PHP

image

zyzo/meteor-ddp-php

DDP client for PHP

  • Saturday, September 10, 2016
  • by zyzo
  • Repository
  • 8 Watchers
  • 50 Stars
  • 278 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 8 Versions
  • 2 % Grown

The README.md

meteor-ddp-php

A minimalist PHP library that implements DDP client, the realtime protocol for Meteor framework., (*1)

Join the chat at https://gitter.im/zyzo/meteor-ddp-php, (*2)

How to use

Suppose you have declared a remote function foo in your meteor server code :, (*3)

Meteor.methods({
  foo : function (arg) {
    check(arg, Number);
    if (arg == 1) { return 42; }
    return "You suck";
  }
});

Then in your php client's code, you could just invoke foo by executing :, (*4)

use zyzo\MeteorDDP\DDPClient;

$client = new DDPClient('localhost', 3000);

$client->connect();

$client->call("foo", array(1));
while(($a = $client->getResult("foo")) === null) {};

echo 'Result = ' . $a . PHP_EOL;

$client->stop();

===>, (*5)

Result = 42

More use cases can be found in the examples folder., (*6)

How to install

This library is available via composer, the dependency manager for PHP. Please add this in your composer.json :, (*7)

"require" : {
    "zyzo/meteor-ddp-php": "1.2.0"
}

and update composer to automatically retrieve the package :, (*8)

php composer.phar update

Run tests

cd tests
// install composer.phar in this folder
php composer.phar update
php [filename].php

The Versions

10/09 2016

dev-master

9999999-dev https://github.com/zyzo/meteor-ddp-php

DDP client for PHP

  Sources   Download

MIT Licence

php meteor ddp ddpclient

10/09 2016

1.2.0

1.2.0.0 https://github.com/zyzo/meteor-ddp-php

DDP client for PHP

  Sources   Download

MIT Licence

php meteor ddp ddpclient

10/09 2016

dev-devel

dev-devel https://github.com/zyzo/meteor-ddp-php

DDP client for PHP

  Sources   Download

MIT Licence

php meteor ddp ddpclient

09/09 2016

dev-test-pr-6

dev-test-pr-6 https://github.com/zyzo/meteor-ddp-php

DDP client for PHP

  Sources   Download

MIT Licence

php meteor ddp ddpclient

03/05 2015

v1.1.0

1.1.0.0 https://github.com/zyzo/meteor-ddp-php

DDP client for PHP

  Sources   Download

MIT Licence

php meteor ddp ddpclient

02/05 2015

dev-async

dev-async https://github.com/zyzo/meteor-ddp-php

DDP client for PHP

  Sources   Download

MIT Licence

php meteor ddp ddpclient

02/04 2015

v1.0.0

1.0.0.0 https://github.com/zyzo/meteor-ddp-php

DDP client for PHP

  Sources   Download

php meteor ddp ddpclient

28/03 2015

v1.0.0-beta

1.0.0.0-beta https://github.com/zyzo/meteor-ddp-php

DDP client for PHP

  Sources   Download

php meteor ddp ddpclient