Contributte Doctrine-mongodb
MongoDB (opens new window) to Nette Framework.
# Content
# Setup
Install package
composer require nettrine/mongodb
1
Register extension
extensions:
nettrine.mongodb: Nettrine\MongoDB\DI\MongoDBExtension
1
2
2
# Configuration
You can look at configuration options here: https://www.php.net/manual/en/mongodb-driver-manager.construct.php (opens new window)
Schema definition
nettrine.mongodb:
uri: <string>
uriOptions: <array>
driverOptions: <array>
1
2
3
4
2
3
4
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.
# Other
This repository is inspired by this package.
Thank you guys.
# Examples
- https://github.com/contributte/playground (opens new window) (playground)
- https://contributte.org/examples.html (opens new window) (more examples)