original_string: public function deleteMany($filter, array $options = [])
      {
          if ( ! isset($options['writeConcern'])) {
              $options['writeConcern'] = $this->writeConcern;
          }
  
          $operation = new DeleteMany($this->databaseName, $this->collectionName, $filter, $options);
          $server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY));
  
          return $operation->execute($server);
      }
code: public function deleteMany($filter, array $options = [])
      {
          if ( ! isset($options['writeConcern'])) {
              $options['writeConcern'] = $this->writeConcern;
          }
  
          $operation = new DeleteMany($this->databaseName, $this->collectionName, $filter, $options);
          $server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY));
  
          return $operation->execute($server);
      }
code_tokens: public function deleteMany ( $ filter , array $ options = [ ] ) { if ( ! isset ( $ options [ 'writeConcern' ] ) ) { $ options [ 'writeConcern' ] = $ this -> writeConcern ; } $ operation = new DeleteMany ( $ this -> databaseName , $ this -> collectionName , $ filter , $ options ) ; $ server = $ this -> manager -> selectServer ( new ReadPreference ( ReadPreference :: RP_PRIMARY ) ) ; return $ operation -> execute ( $ server ) ; }
docstring: Deletes all documents matching the filter.
  
  @see DeleteMany::__construct() for supported options
  @see http://docs.mongodb.org/manual/reference/command/delete/
  @param array|object $filter  Query by which to delete documents
  @param array        $options Command options
  @return DeleteResult
  @throws UnsupportedException if options are not supported by the selected server
  @throws InvalidArgumentException for parameter/option parsing errors
  @throws DriverRuntimeException for other driver errors (e.g. connection errors)
docstring_tokens: Deletes all documents matching the filter .