wildsurfer/silex-provider-mongodm

0.1.3 2013-12-18 21:11 UTC

This package is not auto-updated.

Last update: 2024-03-11 23:19:43 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"
         }
}