We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Create YAML config file:
database1: collection1: lock: OPTIMISTIC documentClass: \Vendor\Entity\Document1 collection2: documentClass: \Vendor\Entity\Document2 *: documentClass: \Vendor\Entity\CommonDocument
Now you can configure client:
use Sokil\Mongo\Client; $client = new Client(); $client->map(yaml_parse_file('/path/to/config.yaml'));