CouchDB PHP handler class