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: 6 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 10 years ago)
- Default Branch: master
- Last Pushed: 2020-09-21T13:03:00.000Z (almost 6 years ago)
- Last Synced: 2025-07-10T22:22:20.598Z (12 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: 12
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://travis-ci.org/kuzzleio/sdk-php) [](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)