public function replace(array $documents)
    {
        $this->clearAdd();
        $this->clearRemove();

        $this->remove($this->getSaved());
        $this->add($documents);
    }
public function replace(array $documents)
    {
        $this->clearAdd();
        $this->clearRemove();

        $this->remove($this->getSaved());
        $this->add($documents);
    }
public function replace ( array $ documents ) { $ this -> clearAdd ( ) ; $ this -> clearRemove ( ) ; $ this -> remove ( $ this -> getSaved ( ) ) ; $ this -> add ( $ documents ) ; }
Replace all documents.

@param array $documents An array of documents.

@api
Replace all documents .