Skip to content
Find file History
Pull request Compare This branch is 3 commits ahead of 77web:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
..
Failed to load latest commit information.
Tests
doc
src
README.md

README.md

DoctrineMongoDBExtension

    wget --no-check-certificate https://github.com/bobthecow/SilexExtensions/raw/master/silex_doctrine_mongodb_extension.phar

usage:


    <?php

    require_once __DIR__.'/silex.phar';
    require_once __DIR__.'/silex_doctrine_mongodb_extension.phar';

    use Silex\Extension\DoctrineMongoDBExtension;

    $app = new Silex\Application;

    $app['autoloader']->registerNamespace('Document', __DIR__);

    $app->register(new DoctrineMongoDBExtension, array(
        'doctrine.odm.mongodb.connection_options' => array(
            'database' => 'bananas',
            'host'     => 'localhost',
        ),
        'doctrine.odm.mongodb.documents' => array(
             array('type' => 'annotation', 'path' => __DIR__.'/Document', 'namespace' => 'Document'),
        ),
        'doctrine.common.class_path'      => __DIR__.'/vendor/doctrine-common/lib',
        'doctrine.mongodb.class_path'     => __DIR__.'/vendor/doctrine-mongodb/lib',
        'doctrine.odm.mongodb.class_path' => __DIR__.'/vendor/doctrine-mongodb-odm/lib',
    ));

Something went wrong with that request. Please try again.