public function withOptions(array $options = [])
    {
        $options += [
            'readConcern' => $this->readConcern,
            'readPreference' => $this->readPreference,
            'typeMap' => $this->typeMap,
            'writeConcern' => $this->writeConcern,
        ];

        return new Database($this->manager, $this->databaseName, $options);
    }
public function withOptions(array $options = [])
    {
        $options += [
            'readConcern' => $this->readConcern,
            'readPreference' => $this->readPreference,
            'typeMap' => $this->typeMap,
            'writeConcern' => $this->writeConcern,
        ];

        return new Database($this->manager, $this->databaseName, $options);
    }
public function withOptions ( array $ options = [ ] ) { $ options += [ 'readConcern' => $ this -> readConcern , 'readPreference' => $ this -> readPreference , 'typeMap' => $ this -> typeMap , 'writeConcern' => $ this -> writeConcern , ] ; return new Database ( $ this -> manager , $ this -> databaseName , $ options ) ; }
Get a clone of this database with different options.

@see Database::__construct() for supported options
@param array $options Database constructor options
@return Database
@throws InvalidArgumentException for parameter/option parsing errors
Get a clone of this database with different options .