public function remove(Document $document, array $options = [])
    {
        $documentId = $this->getDocumentId($document);

        $revision = $this->getRevision($document);

        return $this->removeById($document, $documentId, $revision, $options);
    }
public function remove(Document $document, array $options = [])
    {
        $documentId = $this->getDocumentId($document);

        $revision = $this->getRevision($document);

        return $this->removeById($document, $documentId, $revision, $options);
    }
public function remove ( Document $ document , array $ options = [ ] ) { $ documentId = $ this -> getDocumentId ( $ document ) ; $ revision = $ this -> getRevision ( $ document ) ; return $ this -> removeById ( $ document , $ documentId , $ revision , $ options ) ; }
Remove a document from a collection, identified by the document itself

@throws Exception

@param Document $document - document to be removed
@param array    $options  - optional, array of options
<p>Options are :
<li>'policy' - update policy to be used in case of conflict ('error', 'last' or NULL [use default])</li>
<li>'waitForSync' - can be used to force synchronisation of the document removal operation to disk even in case that the waitForSync flag had been disabled for the entire collection</li>
</p>

@return bool - always true, will throw if there is an error
Remove a document from a collection identified by the document itself