MongoDB to Nette Framework.
Install package
composer require nettrine/mongodb
Register extension
extensions:
nettrine.mongodb: Nettrine\MongoDB\DI\MongoDBExtension
You can look at configuration options here: https://www.php.net/manual/en/mongodb-driver-manager.construct.php
Schema definition
nettrine.mongodb:
uri: <string>
uriOptions: <array>
driverOptions: <array>
Under the hood
Default URI is: mongodb://127.0.0.1
Side notes
- At this time we support only 1 connection, the default connection. If you need more connections (more databases?), please open an issue or send a PR. Thanks.
This repository is inspired by this package.
Thank you guys.
- https://github.com/contributte/playground (playground)
- https://contributte.org/examples.html (more examples)