{"id":17981710,"url":"https://github.com/zyzo/meteor-ddp-php","last_synced_at":"2025-06-11T09:35:15.002Z","repository":{"id":29210416,"uuid":"32741915","full_name":"zyzo/meteor-ddp-php","owner":"zyzo","description":"Minimalist PHP library for client-side DDP communication","archived":false,"fork":false,"pushed_at":"2016-09-13T12:32:36.000Z","size":49,"stargazers_count":47,"open_issues_count":1,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-29T04:51:30.657Z","etag":null,"topics":["ddp-client","meteor","meteor-ddp-php","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zyzo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-23T15:45:55.000Z","updated_at":"2023-05-21T19:00:12.000Z","dependencies_parsed_at":"2022-09-03T17:41:05.449Z","dependency_job_id":null,"html_url":"https://github.com/zyzo/meteor-ddp-php","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyzo%2Fmeteor-ddp-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyzo%2Fmeteor-ddp-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyzo%2Fmeteor-ddp-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyzo%2Fmeteor-ddp-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zyzo","download_url":"https://codeload.github.com/zyzo/meteor-ddp-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyzo%2Fmeteor-ddp-php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259239306,"owners_count":22826902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ddp-client","meteor","meteor-ddp-php","php"],"created_at":"2024-10-29T18:11:50.114Z","updated_at":"2025-06-11T09:35:14.956Z","avatar_url":"https://github.com/zyzo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# meteor-ddp-php\n\nA [minimalist](http://www.becomingminimalist.com/) PHP library that implements DDP client, the realtime protocol for [Meteor](https://www.meteor.com/ddp) framework.\n\n[![Join the chat at https://gitter.im/zyzo/meteor-ddp-php](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/zyzo/meteor-ddp-php?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n\n### How to use\n\nSuppose you have declared a remote function `foo` in your meteor server code :\n```javascript\nMeteor.methods({\n  foo : function (arg) {\n    check(arg, Number);\n    if (arg == 1) { return 42; }\n    return \"You suck\";\n  }\n});\n```\n\nThen in your php client's code, you could just invoke `foo` by executing :\n```php\nuse zyzo\\MeteorDDP\\DDPClient;\n\n$client = new DDPClient('localhost', 3000);\n\n$client-\u003econnect();\n\n$client-\u003ecall(\"foo\", array(1));\nwhile(($a = $client-\u003egetResult(\"foo\")) === null) {};\n\necho 'Result = ' . $a . PHP_EOL;\n\n$client-\u003estop();\n```\n\n===\u003e\n```\nResult = 42\n```\n\nMore use cases can be found in the [examples](https://github.com/zyzo/meteor-ddp-php/tree/devel/examples) folder.\n### How to install\n   This library is available via [composer](https://packagist.org/packages/zyzo/meteor-ddp-php), the dependency manager for PHP. Please add this in your composer.json :\n```php\n\"require\" : {\n    \"zyzo/meteor-ddp-php\": \"1.2.0\"\n}\n```\n  and update composer to automatically retrieve the package :\n```shell\nphp composer.phar update\n```\n\n### Run tests\n```shell\ncd tests\n// install composer.phar in this folder\nphp composer.phar update\nphp [filename].php\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyzo%2Fmeteor-ddp-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzyzo%2Fmeteor-ddp-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyzo%2Fmeteor-ddp-php/lists"}