2017 © Pedro Peláez
 

library meteor-ddp-php

DDP client for PHP

image

synchrotalk/meteor-ddp-php

DDP client for PHP

  • Tuesday, September 20, 2016
  • by Enelar
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % 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/synchrotalk/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 synchrotalk\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" : {
    "synchrotalk/meteor-ddp-php": "0.1.0"
}

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

php composer.phar update

Roadmap

None, (*9)

Version

0.1.0, (*10)

The Versions

20/09 2016

dev-refactor

dev-refactor https://github.com/synchrotalk/meteor-ddp-php

DDP client for PHP

  Sources   Download

MIT Licence

The Requires

 

The Development Requires

  • synchrotalk/websocket dev-master

php meteor ddp ddpclient