Beispiel #1
0
 function getDoc($documentId, $data = null)
 {
     $url = '/' . $this->db . '/' . $documentId;
     $request = new CouchDB_Request($this->host, $this->port, $url, 'GET', json_encode($data));
     return $request->send();
 }
Beispiel #2
0
 function send($url, $method = 'get', $data = NULL)
 {
     $url = '/' . $this->db . (substr($url, 0, 1) == '/' ? $url : '/' . $url);
     $request = new CouchDB_Request($this->host, $this->port, $url, $method, $data, $this->username, $this->password);
     return $request->send();
 }