DependencyInjection/DoctrineMongoDBExtension.php
protected function loadDocumentManagerBundlesMappingInformation(array $documentManager, Definition $odmConfigDef, ContainerBuilder $container)
    {
        // reset state of drivers and alias map. They are only used by this methods and children.
        $this->drivers  = [];
        $this->aliasMap = [];

        $this->loadMappingInformation($documentManager, $container);
        $this->registerMappingDrivers($documentManager, $container);

        if ($odmConfigDef->hasMethodCall('setDocumentNamespaces')) {
            // TODO: Can we make a method out of it on Definition? replaceMethodArguments() or something.
            $calls = $odmConfigDef->getMethodCalls();
            foreach ($calls as $call) {
                if ($call[0] !== 'setDocumentNamespaces') {
                    continue;
                }

                $this->aliasMap = array_merge($call[1][0], $this->aliasMap);
            }
            $method = $odmConfigDef->removeMethodCall('setDocumentNamespaces');
        }
        $odmConfigDef->addMethodCall('setDocumentNamespaces', [$this->aliasMap]);
    }
protected function loadDocumentManagerBundlesMappingInformation(array $documentManager, Definition $odmConfigDef, ContainerBuilder $container)
    {
        // reset state of drivers and alias map. They are only used by this methods and children.
        $this->drivers  = [];
        $this->aliasMap = [];

        $this->loadMappingInformation($documentManager, $container);
        $this->registerMappingDrivers($documentManager, $container);

        if ($odmConfigDef->hasMethodCall('setDocumentNamespaces')) {
            // TODO: Can we make a method out of it on Definition? replaceMethodArguments() or something.
            $calls = $odmConfigDef->getMethodCalls();
            foreach ($calls as $call) {
                if ($call[0] !== 'setDocumentNamespaces') {
                    continue;
                }

                $this->aliasMap = array_merge($call[1][0], $this->aliasMap);
            }
            $method = $odmConfigDef->removeMethodCall('setDocumentNamespaces');
        }
        $odmConfigDef->addMethodCall('setDocumentNamespaces', [$this->aliasMap]);
    }
protected function loadDocumentManagerBundlesMappingInformation ( array $ documentManager , Definition $ odmConfigDef , ContainerBuilder $ container ) { // reset state of drivers and alias map. They are only used by this methods and children. $ this -> drivers = [ ] ; $ this -> aliasMap = [ ] ; $ this -> loadMappingInformation ( $ documentManager , $ container ) ; $ this -> registerMappingDrivers ( $ documentManager , $ container ) ; if ( $ odmConfigDef -> hasMethodCall ( 'setDocumentNamespaces' ) ) { // TODO: Can we make a method out of it on Definition? replaceMethodArguments() or something. $ calls = $ odmConfigDef -> getMethodCalls ( ) ; foreach ( $ calls as $ call ) { if ( $ call [ 0 ] !== 'setDocumentNamespaces' ) { continue ; } $ this -> aliasMap = array_merge ( $ call [ 1 ] [ 0 ] , $ this -> aliasMap ) ; } $ method = $ odmConfigDef -> removeMethodCall ( 'setDocumentNamespaces' ) ; } $ odmConfigDef -> addMethodCall ( 'setDocumentNamespaces' , [ $ this -> aliasMap ] ) ; }
Loads an ODM document managers bundle mapping information.

There are two distinct configuration possibilities for mapping information:

1. Specify a bundle and optionally details where the entity and mapping information reside.
2. Specify an arbitrary mapping location.

@param array            $documentManager A configured ODM entity manager.
@param Definition       $odmConfigDef    A Definition instance
@param ContainerBuilder $container       A ContainerBuilder instance

@example

doctrine_mongodb:
mappings:
MyBundle1: ~
MyBundle2: xml
MyBundle3: { type: annotation, dir: Documents/ }
MyBundle4: { type: xml, dir: Resources/config/doctrine/mapping }
MyBundle5:
type: xml
dir: [bundle-mappings1/, bundle-mappings2/]
alias: BundleAlias
arbitrary_key:
type: xml
dir: %kernel.dir%/../src/vendor/DoctrineExtensions/lib/DoctrineExtensions/Documents
prefix: DoctrineExtensions\Documents\
alias: DExt

In the case of bundles everything is really optional (which leads to autodetection for this bundle) but
in the mappings key everything except alias is a required argument.
Loads an ODM document managers bundle mapping information .