<commit_before>MongoDbExtension
================

The *MongoDbExtension* provides asset to MongoDB instances
through Doctrine's `MongoDB <https://github.com/doctrine/mongodb>`_
library.

Parameters
----------

* **assetic.connection**: An associative array of arguments for the MongoDB Connection class

* **assetic.connection => server** (optional): The server to connect to. 

* **assetic.connection => options** (optional): An associative array of options,
  passed in as the second argument to the Constructor, see Doctrine MongoDB documentation
  for all available options.

* **assetic.connection => configuration** (optional): A callback function to configure 
  (add logger, ...) the Configuration instance before passing it to the Constructor of the 
  Connection class.

* **assetic.connection => eventmanager** (optional): A callback function to configure 
  (add listener, ...) the EventManager instance before passing it to the Constructor of the 
  Connection class.

* **assetic.class_path** (optional): Path to where the Doctrine MongoDB
  library is located.

Services
--------

* **mongodb**: Instance of Doctrine MongoDB Connection

* **mongodb.configuration**: Instance of Doctrine MongoDB Configuration

* **mongodb.event_manager**: Instance of Doctrine Common EventManager


Registering
-----------

Make sure you place a copy of *Doctrine\MongoDB* in the ``vendor/mongodb``
directory.

  Example registration and configuration::

    // add your 
    $app['autoloader']->registerNamespace('SilexExtension', __DIR__ . '/path/to/silex-extensions');
    $app->register(new SilexExtension\MongoDbExtension(), array(
        'mongodb.class_path'    => __DIR__ . '/vendor/mongodb/lib',
        'mongodb.connection'    => array(
            'configuration' => function($configuration) {<commit_msg>Edited doc/mongodb.rst via GitHub<commit_after>MongoDbExtension
================

The *MongoDbExtension* provides asset to MongoDB instances
through Doctrine's `MongoDB <https://github.com/doctrine/mongodb>`_
library.

Parameters
----------

* **assetic.connection**: An associative array of arguments for the MongoDB Connection class

* **assetic.connection => server** (optional): The server to connect to. 

* **assetic.connection => options** (optional): An associative array of options,
  passed in as the second argument to the Constructor, see Doctrine MongoDB documentation
  for all available options.

* **assetic.connection => configuration** (optional): A callback function to configure 
  (add logger, ...) the Configuration instance before passing it to the Constructor of the 
  Connection class.

* **assetic.connection => eventmanager** (optional): A callback function to configure 
  (add listener, ...) the EventManager instance before passing it to the Constructor of the 
  Connection class.

* **assetic.class_path** (optional): Path to where the Doctrine MongoDB
  library is located.

Services
--------

* **mongodb**: Instance of Doctrine MongoDB Connection

* **mongodb.configuration**: Instance of Doctrine MongoDB Configuration

* **mongodb.event_manager**: Instance of Doctrine Common EventManager


Registering
-----------

Make sure you place a copy of *Doctrine\\MongoDB* in the ``vendor/mongodb``
directory.

  Example registration and configuration::

    // add your 
    $app['autoloader']->registerNamespace('SilexExtension', __DIR__ . '/path/to/silex-extensions');
    $app->register(new SilexExtension\MongoDbExtension(), array(
        'mongodb.class_path'    => __DIR__ . '/vendor/mongodb/lib',
        'mongodb.connection'    => array(
            'configuration' => function($configuration) {
{'fraction_non_alphanumeric': 0.1263359824609482, 'fraction_numerical': 0.0, 'mean_word_length': 4.177304964539007, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2919545', 'n_tokens_mistral': 995, 'n_tokens_neox': 939, 'n_words': 335}