Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kuzzleio/sdk-php
Official php SDK for Kuzzle
https://github.com/kuzzleio/sdk-php
kuzzle kuzzle-sdk offline-first php swig
Last synced: about 2 months ago
JSON representation
Official php SDK for Kuzzle
- Host: GitHub
- URL: https://github.com/kuzzleio/sdk-php
- Owner: kuzzleio
- License: apache-2.0
- Archived: true
- Created: 2016-06-21T16:02:36.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-09-21T13:03:00.000Z (almost 4 years ago)
- Last Synced: 2024-06-23T12:44:51.520Z (3 months ago)
- Topics: kuzzle, kuzzle-sdk, offline-first, php, swig
- Language: PHP
- Homepage: http://docs.kuzzle.io/sdk-reference
- Size: 1.15 MB
- Stars: 6
- Watchers: 13
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/kuzzleio/sdk-php.svg?branch=master)](https://travis-ci.org/kuzzleio/sdk-php) [![codecov.io](http://codecov.io/github/kuzzleio/sdk-php/coverage.svg?branch=master)](http://codecov.io/github/kuzzleio/sdk-php?branch=master)
Official Kuzzle PHP SDK
======## About Kuzzle
A backend software, self-hostable and ready to use to power modern apps.
You can access the Kuzzle repository on [Github](https://github.com/kuzzleio/kuzzle)
* [SDK Documentation](#sdk-documentation)
* [Installation](#installation)
* [Basic usage](#basic-usage)
* [Running tests](#tests)
* [License](#license)## SDK Documentation
The complete SDK documentation is available [here](http://docs.kuzzle.io/sdk-reference/)
## Installation
This SDK can be used in any project using composer:
```
composer require kuzzleio/kuzzle-sdk
```## Basic usage
```php
collection('bar', 'foo');$firstDocument = new Document($collection, 'john', ['name' => 'John', 'age' => 42]);
$secondDocument = new Document($collection, 'michael', ['name' => 'Michael', 'age' => 36]);$firstDocument->save(['refresh' => 'wait_for']);
$secondDocument->save(['refresh' => 'wait_for']);$result = $collection->search(['sort' => [['age' => 'asc']]]);
foreach ($result->getDocuments() as $document) {
$content = $document->getContent();
echo "Name: {$content['name']}, age: {$content['age']}\n";
}
``````
php ./vendor/bin/phpcs -p -n --standard=PSR2 src
php ./vendor/bin/phpunit
```## License
[Apache 2](LICENSE.md)