original_string: public function find($filter = [], array $options = [])
      {
          if ( ! isset($options['readPreference'])) {
              $options['readPreference'] = $this->readPreference;
          }
  
          $server = $this->manager->selectServer($options['readPreference']);
  
          if ( ! isset($options['readConcern']) && \MongoDB\server_supports_feature($server, self::$wireVersionForReadConcern)) {
              $options['readConcern'] = $this->readConcern;
          }
  
          if ( ! isset($options['typeMap'])) {
              $options['typeMap'] = $this->typeMap;
          }
  
          $operation = new Find($this->databaseName, $this->collectionName, $filter, $options);
  
          return $operation->execute($server);
      }
code: public function find($filter = [], array $options = [])
      {
          if ( ! isset($options['readPreference'])) {
              $options['readPreference'] = $this->readPreference;
          }
  
          $server = $this->manager->selectServer($options['readPreference']);
  
          if ( ! isset($options['readConcern']) && \MongoDB\server_supports_feature($server, self::$wireVersionForReadConcern)) {
              $options['readConcern'] = $this->readConcern;
          }
  
          if ( ! isset($options['typeMap'])) {
              $options['typeMap'] = $this->typeMap;
          }
  
          $operation = new Find($this->databaseName, $this->collectionName, $filter, $options);
  
          return $operation->execute($server);
      }
code_tokens: public function find ( $ filter = [ ] , array $ options = [ ] ) { if ( ! isset ( $ options [ 'readPreference' ] ) ) { $ options [ 'readPreference' ] = $ this -> readPreference ; } $ server = $ this -> manager -> selectServer ( $ options [ 'readPreference' ] ) ; if ( ! isset ( $ options [ 'readConcern' ] ) && \ MongoDB \ server_supports_feature ( $ server , self :: $ wireVersionForReadConcern ) ) { $ options [ 'readConcern' ] = $ this -> readConcern ; } if ( ! isset ( $ options [ 'typeMap' ] ) ) { $ options [ 'typeMap' ] = $ this -> typeMap ; } $ operation = new Find ( $ this -> databaseName , $ this -> collectionName , $ filter , $ options ) ; return $ operation -> execute ( $ server ) ; }
docstring: Finds documents matching the query.
  
  @see Find::__construct() for supported options
  @see http://docs.mongodb.org/manual/core/read-operations-introduction/
  @param array|object $filter  Query by which to filter documents
  @param array        $options Additional options
  @return Cursor
  @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: Finds documents matching the query .