Phalcon\Db\Adapter\MongoDB\Collection::withOptions PHP Method

withOptions() public method

Get a clone of this collection with different options.
See also: Collection::__construct() for supported options
public withOptions ( array $options = [] ) : Collection
$options array Collection constructor options
return Collection
    public function withOptions(array $options = [])
    {
        $options += ['readConcern' => $this->readConcern, 'readPreference' => $this->readPreference, 'typeMap' => $this->typeMap, 'writeConcern' => $this->writeConcern];
        return new Collection($this->manager, $this->databaseName, $this->collectionName, $options);
    }