Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/myurasov/silex-mongodb-provider
MongoDB provider for Silex applications
https://github.com/myurasov/silex-mongodb-provider
Last synced: 3 days ago
JSON representation
MongoDB provider for Silex applications
- Host: GitHub
- URL: https://github.com/myurasov/silex-mongodb-provider
- Owner: myurasov
- Created: 2015-08-20T05:08:34.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-20T12:18:07.000Z (about 9 years ago)
- Last Synced: 2024-04-05T10:44:22.263Z (7 months ago)
- Language: PHP
- Size: 125 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MongoDB Provider for Silex Applications
## Installation with Composer
Add the following line to your _composer.json_ __require__ section:
```
"myurasov/silex-mongodb-provider": "*"
```Or do
`composer require myurasov/silex-mongodb-provider`
## Service Registration
```
$app->register(new MongoClientProvider(), [config options]);
```Then `$app['mongodb.mongo_client']` service becomes available.
## Confuguration Options
```
$app['mongodb.mongo_client_options'] = [
'server' => ,
'options' => ,
'driver_options' =>
];$app['mongodb.db'] = ;
```See [http://php.net/manual/en/mongoclient.construct.php](http://php.net/manual/en/mongoclient.construct.php) for more info on parameters above.
## License
[WTFPL](http://www.wtfpl.net/)