src/CouchDB/Database.php
public function find($id)
    {
        $response = $this->client->request('GET', sprintf('/%s/%s', $this->name, $id));
        $json = (string) $response->getBody();

        if (404 === $response->getStatusCode()) {
            throw new Exception('Document does not exist');
        }

        return JSONEncoder::decode($json);
    }
public function find($id)
    {
        $response = $this->client->request('GET', sprintf('/%s/%s', $this->name, $id));
        $json = (string) $response->getBody();

        if (404 === $response->getStatusCode()) {
            throw new Exception('Document does not exist');
        }

        return JSONEncoder::decode($json);
    }
public function find ( $ id ) { $ response = $ this -> client -> request ( 'GET' , sprintf ( '/%s/%s' , $ this -> name , $ id ) ) ; $ json = ( string ) $ response -> getBody ( ) ; if ( 404 === $ response -> getStatusCode ( ) ) { throw new Exception ( 'Document does not exist' ) ; } return JSONEncoder :: decode ( $ json ) ; }
Find a document by a id.

@param string $id

@throws Exception If the document doesn't exists.

@return mixed
Find a document by a id .