wildsurfer/silex-provider-mongodm

Installs: 2 527

Dependents: 0

Stars: 3

Watchers: 2

Forks: 3

Language: PHP

0.1.3 2013-12-18 21:11 UTC

README

Mongodm service provider for silex micro-framework. Check here: https://github.com/purekid/mongodm

Example

<?php
use Silex\Application;

$host = 'localhost:27017';
$db = 'database';
$options = array('w' => 1);
$app = new Application();
$app->register(new MongodmServiceProvider(), array(
            "mongodm.host" => $host,
            "mongodm.db" => $db,
            "mongodm.options" => $options
            ));
$m = $app['mongodm'];
$m->findOne('MyCollection',array('name' => 'my name'));

Install with Composer

{
require: {
             "wildsurfer/silex-provider-mongodm": "dev-master"
         }
}