plansky / mongolid-bundle
Easy, powerful and ultrafast MongoDB ODM Bundle for Symfony.
v0.1-beta
2014-08-12 03:00 UTC
Requires
- php: >=5.3
- zizaco/mongolid: 0.5.*
This package is not auto-updated.
Last update: 2024-11-05 04:19:46 UTC
README
MongoLid Bundle for Symfony
MongoLid is an easy, powerful and ultrafast MongoDB ODM. You can see more information in the MongoLid Laravel Package
Getting Started
Installation
Add "plansky/mongolid-bundle": "dev-master"
to "require" key in composer.json
"require": { ... "plansky/mongolid-bundle": "dev-master" }
Run composer update plansky/mongolid-bundle
Bundle Registration
Register MongolidBundle in AppKernel
class
$bundles = array( ... new Plansky\MongolidBundle\MongolidBundle(), );
Configure MongoDB Connection
Edit app/config/config.yml
file adding the MongoDB connection
mongolid: connections: default: hostname: 'localhost' port: 27017 username: null password: null database: 'mongolid'
Extends BaseDocument
To start using MongoLid just extends Plansky\MongolidBundle\Document\BaseDocument
class MyDocument extends \Plansky\MongolidBundle\Document\BaseDocument { /** * Collection's that will be used to persist my document * @var string */ protected $collection = 'my_collection'; }
Enjoy =)
License
MIT
Resources
- Mongolid
- Mongolid Laravel Package (with detailed documentation):