src/Components/DocumentDBConnection.php
public function replaceDocument($collection, array $data, $id, array $options = [])
    {
        $this->setOptions($options);
        $doc = new Document($this->client, $this->database, $collection);
        $doc->setHeaders($this->getHeaders());
        $rs = $doc->replace($data, $id);
        $this->checkResponse($rs);
        unset($rs['_curl_info']);

        return $rs;
    }
public function replaceDocument($collection, array $data, $id, array $options = [])
    {
        $this->setOptions($options);
        $doc = new Document($this->client, $this->database, $collection);
        $doc->setHeaders($this->getHeaders());
        $rs = $doc->replace($data, $id);
        $this->checkResponse($rs);
        unset($rs['_curl_info']);

        return $rs;
    }
public function replaceDocument ( $ collection , array $ data , $ id , array $ options = [ ] ) { $ this -> setOptions ( $ options ) ; $ doc = new Document ( $ this -> client , $ this -> database , $ collection ) ; $ doc -> setHeaders ( $ this -> getHeaders ( ) ) ; $ rs = $ doc -> replace ( $ data , $ id ) ; $ this -> checkResponse ( $ rs ) ; unset ( $ rs [ '_curl_info' ] ) ; return $ rs ; }
Replaces a document.

@param string $collection Collection to replace a document in
@param array  $data       Document data
@param string $id         ID of the document being replaced
@param array  $options    Operation options

@return array
Replaces a document .