original_string: public function command($command, array $options = [])
      {
          if ( ! isset($options['readPreference'])) {
              $options['readPreference'] = $this->readPreference;
          }
  
          if ( ! isset($options['typeMap'])) {
              $options['typeMap'] = $this->typeMap;
          }
  
          $operation = new DatabaseCommand($this->databaseName, $command, $options);
          $server = $this->manager->selectServer($options['readPreference']);
  
          return $operation->execute($server);
      }
code: public function command($command, array $options = [])
      {
          if ( ! isset($options['readPreference'])) {
              $options['readPreference'] = $this->readPreference;
          }
  
          if ( ! isset($options['typeMap'])) {
              $options['typeMap'] = $this->typeMap;
          }
  
          $operation = new DatabaseCommand($this->databaseName, $command, $options);
          $server = $this->manager->selectServer($options['readPreference']);
  
          return $operation->execute($server);
      }
code_tokens: public function command ( $ command , array $ options = [ ] ) { if ( ! isset ( $ options [ 'readPreference' ] ) ) { $ options [ 'readPreference' ] = $ this -> readPreference ; } if ( ! isset ( $ options [ 'typeMap' ] ) ) { $ options [ 'typeMap' ] = $ this -> typeMap ; } $ operation = new DatabaseCommand ( $ this -> databaseName , $ command , $ options ) ; $ server = $ this -> manager -> selectServer ( $ options [ 'readPreference' ] ) ; return $ operation -> execute ( $ server ) ; }
docstring: Execute a command on this database.
  
  @see DatabaseCommand::__construct() for supported options
  @param array|object $command Command document
  @param array        $options Options for command execution
  @return Cursor
  @throws InvalidArgumentException for parameter/option parsing errors
  @throws DriverRuntimeException for other driver errors (e.g. connection errors)
docstring_tokens: Execute a command on this database .