Phalcon\Db\Adapter\MongoDB\Collection::replaceOne PHP Method

replaceOne() public method

Replaces at most one document matching the filter.
See also: ReplaceOne::__construct() for supported options
See also: http://docs.mongodb.org/manual/reference/command/update/
public replaceOne ( array | object $filter, array | object $replacement, array $options = [] ) : UpdateResult
$filter array | object Query by which to filter documents
$replacement array | object Replacement document
$options array Command options
return UpdateResult
    public function replaceOne($filter, $replacement, array $options = [])
    {
        if (!isset($options['writeConcern'])) {
            $options['writeConcern'] = $this->writeConcern;
        }
        $operation = new ReplaceOne($this->databaseName, $this->collectionName, $filter, $replacement, $options);
        $server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY));
        return $operation->execute($server);
    }