Phalcon\Db\Adapter\MongoDB\Collection::updateMany PHP Méthode

updateMany() public méthode

Updates all documents matching the filter.
See also: UpdateMany::__construct() for supported options
See also: http://docs.mongodb.org/manual/reference/command/update/
public updateMany ( array | object $filter, array | object $update, array $options = [] ) : UpdateResult
$filter array | object Query by which to filter documents
$update array | object Update to apply to the matched documents
$options array Command options
Résultat UpdateResult
    public function updateMany($filter, $update, array $options = [])
    {
        if (!isset($options['writeConcern'])) {
            $options['writeConcern'] = $this->writeConcern;
        }
        $operation = new UpdateMany($this->databaseName, $this->collectionName, $filter, $update, $options);
        $server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY));
        return $operation->execute($server);
    }