All Projects → zyzo → meteor-ddp-php

zyzo / meteor-ddp-php

Licence: other
Minimalist PHP library for client-side DDP communication

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to meteor-ddp-php

hypersubs
an upgraded version of Meteor subscribe, which helps optimize data and performance!
Stars: ✭ 13 (-73.47%)
Mutual labels:  meteor, ddp-client
meteorman
A DDP client with GUI (The Postman for Meteor)
Stars: ✭ 51 (+4.08%)
Mutual labels:  meteor, ddp-client
Block-Farm
A farming game built upon Ethereum platform.
Stars: ✭ 60 (+22.45%)
Mutual labels:  meteor
auto-analytics
UNMAINTAINED! - Complete Google Analytics, Mixpanel, KISSmetrics (and more) integration for JavaScript applications.
Stars: ✭ 28 (-42.86%)
Mutual labels:  meteor
Meteor-logger-mongo
🍃 Meteor Logging: Store application log messages in MongoDB
Stars: ✭ 20 (-59.18%)
Mutual labels:  meteor
meteor-autoform-bs-datetimepicker
Custom bootstrap-datetimepicker input type with timezone support for AutoForm
Stars: ✭ 18 (-63.27%)
Mutual labels:  meteor
astroapp-rn-boilerplate
AstroApp, all backend React Native app boilerplate
Stars: ✭ 13 (-73.47%)
Mutual labels:  meteor
Meteor-Mailer
📮 Bulletproof email queue on top of NodeMailer with support of multiple clusters and servers setup
Stars: ✭ 21 (-57.14%)
Mutual labels:  meteor
meteor-docker
Docker image for Meteor.
Stars: ✭ 41 (-16.33%)
Mutual labels:  meteor
redoc
redoc - generate documentation from multiple project repos.
Stars: ✭ 21 (-57.14%)
Mutual labels:  meteor
Meteor-Tutorials
Meteor官方教程(中文翻译)
Stars: ✭ 44 (-10.2%)
Mutual labels:  meteor
React-Hue
🎨 A Material color palette tool based on Meteor, React, Material UI.
Stars: ✭ 45 (-8.16%)
Mutual labels:  meteor
meteor-devtools-evolved
The Meteor framework development tool belt, evolved.
Stars: ✭ 146 (+197.96%)
Mutual labels:  meteor
node-on-fhir
Tech stack for building MACRA and 21st Century Cures compliant webapps.
Stars: ✭ 75 (+53.06%)
Mutual labels:  meteor
crater
Meteor/Webpack/React SSR app skeleton that runs your app code outside of Meteor Isobuild
Stars: ✭ 82 (+67.35%)
Mutual labels:  meteor
meteor-astrocoders-publish
Smartly re-use Meteor publications logic
Stars: ✭ 33 (-32.65%)
Mutual labels:  meteor
graphqlizer
Make your meteor mongo collections accessible over a graphql endpoint
Stars: ✭ 37 (-24.49%)
Mutual labels:  meteor
braintree-meteor-example
A simple Meteor and Braintree drop-in integration
Stars: ✭ 25 (-48.98%)
Mutual labels:  meteor
meteor-telegram-bot
Telegram bot plugin for Meteor
Stars: ✭ 25 (-48.98%)
Mutual labels:  meteor
meteor-application-template-react
Template for application development using Meteor, Bootstrap 5, and React
Stars: ✭ 2 (-95.92%)
Mutual labels:  meteor

meteor-ddp-php

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

Join the chat at https://gitter.im/zyzo/meteor-ddp-php

How to use

Suppose you have declared a remote function foo in your meteor server code :

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 :

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();

===>

Result = 42

More use cases can be found in the examples folder.

How to install

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

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

and update composer to automatically retrieve the package :

php composer.phar update

Run tests

cd tests
// install composer.phar in this folder
php composer.phar update
php [filename].php
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].