PHP Class for CouchDB