public function buildObjectFromResponse(CouchResponse $response)
 {
     if (!$response->getSource() instanceof CouchDb) {
         throw new CouchException("Can only build a document object from a database source, a '" . get_class($response->getSource()) . "' source object was provided");
     }
     return CouchDocument::create($response->getSource(), $response->getBody());
 }
 /**
  * builds the requested object. This method should be overridden without calling
  * parent::buildObjectFromResponse
  * extend this method to request different objects from the response
  *
  * @return object
  * @author The Young Shepherd
  **/
 public function buildObjectFromResponse(CouchResponse $response)
 {
     return new CouchData($response->getBody(), true);
 }
 public function buildObjectFromResponse(CouchResponse $response)
 {
     return new CouchSet($response->getSource(), $response->getBody());
 }