mongator/mongator-bundle

Bundle to use Mongator with Symfony2

Installs: 63

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 0

Type:symfony-bundle

v1.1.1 2014-05-31 00:51 UTC

This package is not auto-updated.

Last update: 2024-11-09 16:06:32 UTC


README

Mongator Symfony Bundle

#Mongator Bundle Build Status Coverage Status

Bundle to use Mongator ODM with Symfony2 (forked from MandangoBundle).

Getting started

Installation

To install mongator-bundle with Composer, just add the following to your composer.json file:

// composer.json
{
    "require": {
        "mongator/mongator-bundle": "1.1.*"
    }
}

Then update the dependency

$ php composer.phar update mongator/mongator-bundle

Or you can do this in one command:

$ php composer.phar require mongator/mongator-bundle:1.1.*

Enable the bundle

You need to register the bundle in AppKernel:

    // app/AppKernel.php

    class AppKernel extends Kernel
    {
        // ...

        public function registerBundles()
        {
            $bundles = array(
                // ...,
                new Mongator\MongatorBundle\MongatorBundle()
            );

            // ...
        }
    }

Configure Mongator

Add Mongator to your configuration:

# app/config/config.yml
mongator:
    default_connection: local
    connections:
        local:
            server:   mongodb://localhost:27017
            database: symfony2_local_%kernel.environment%

Activate the profiler in the developing environment:

# app/config/config_dev.yml
mongator:
    logging: true

Documentation

See the documentation in http://mandango.org/doc/