CouchDB PHP handle class