lib/Doctrine/CouchDB/CouchDBClient.php
public function findRevisions($docId, $revisions = null)
    {
        $path = '/'.$this->databaseName.'/'.urlencode($docId);
        if (is_array($revisions)) {
            // Fetch documents of only the specified leaf revisions.
            $path .= '?open_revs='.json_encode($revisions);
        } else {
            // Fetch documents of all leaf revisions.
            $path .= '?open_revs=all';
        }
        // Set the Accept header to application/json to get a JSON array in the
        // response's body. Without this the response is multipart/mixed stream.
        return $this->httpClient->request(
            'GET',
            $path,
            null,
            false,
            ['Accept' => 'application/json']
        );
    }
public function findRevisions($docId, $revisions = null)
    {
        $path = '/'.$this->databaseName.'/'.urlencode($docId);
        if (is_array($revisions)) {
            // Fetch documents of only the specified leaf revisions.
            $path .= '?open_revs='.json_encode($revisions);
        } else {
            // Fetch documents of all leaf revisions.
            $path .= '?open_revs=all';
        }
        // Set the Accept header to application/json to get a JSON array in the
        // response's body. Without this the response is multipart/mixed stream.
        return $this->httpClient->request(
            'GET',
            $path,
            null,
            false,
            ['Accept' => 'application/json']
        );
    }
public function findRevisions ( $ docId , $ revisions = null ) { $ path = '/' . $ this -> databaseName . '/' . urlencode ( $ docId ) ; if ( is_array ( $ revisions ) ) { // Fetch documents of only the specified leaf revisions. $ path .= '?open_revs=' . json_encode ( $ revisions ) ; } else { // Fetch documents of all leaf revisions. $ path .= '?open_revs=all' ; } // Set the Accept header to application/json to get a JSON array in the // response's body. Without this the response is multipart/mixed stream. return $ this -> httpClient -> request ( 'GET' , $ path , null , false , [ 'Accept' => 'application/json' ] ) ; }
Find documents of all or the specified revisions.

If $revisions is an array containing the revisions to be fetched, only
the documents of those revisions are fetched. Else document of all
leaf revisions are fetched.

@param string $docId
@param mixed  $revisions

@return HTTP\Response
Find documents of all or the specified revisions .