chill/chill

CouchDb client library for PHP 5.3+

Installs: 260

Dependents: 0

Stars: 31

Watchers: 8

Forks: 7

Open Issues: 4

Language: PHP

v1.0.0 2013-02-26 11:51 UTC

README

Chill is a simple and efficient CouchDb client library for PHP. Released under the BSD 2 Clause Licence and made available via Composer/Packagist.

Current Build Status:

Build Status

Example usage

Retrieve a single document by ID:

$chill = new Chill\Client('localhost', 'my_database');
$doc = $chill->get('8128173972d50affdb6724ecbd00d9fc');
print $doc['_id'];

Retrieve the results of a view as Chill Document objects:

$chill = new Chill\Client('localhost', 'my_database');
$docs = $chill->asDocuments()->getView('mydesign', 'myview', array('key1', 'key2'));

foreach ($docs as $doc) {
    print $doc->_id . PHP_EOL;
} 

Retrieve and update a document

$chill = new Chill\Client('localhost', 'my_database');
$doc = $chill->get('8128173972d50affdb6724ecbd00d9fc');
$doc->title = 'Changing my doc.';
$doc->save();

With thanks to