Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 51 lines (44 sloc) 1.91 kb
577df30 Fabien Potencier renamed Symfony\Framework to Symfony\Bundle
fabpot authored
1 <?php
2
08fd722 blue-eyes normalized license messages in PHP files
blue-eyes authored
3 /*
6bed7e1 Christophe Coevoet Updated license header
stof authored
4 * This file is part of the Doctrine MongoDBBundle
5 *
6 * The code was originally distributed inside the Symfony framework.
08fd722 blue-eyes normalized license messages in PHP files
blue-eyes authored
7 *
b278f2c Fabien Potencier replaced symfony-project.org by symfony.com
fabpot authored
8 * (c) Fabien Potencier <fabien@symfony.com>
6bed7e1 Christophe Coevoet Updated license header
stof authored
9 * (c) Doctrine Project
08fd722 blue-eyes normalized license messages in PHP files
blue-eyes authored
10 *
11 * For the full copyright and license information, please view the LICENSE
12 * file that was distributed with this source code.
13 */
14
7bf1302 Christophe Coevoet Changed the namespace to Doctrine\Bundle\MongoDBBundle
stof authored
15 namespace Doctrine\Bundle\MongoDBBundle;
577df30 Fabien Potencier renamed Symfony\Framework to Symfony\Bundle
fabpot authored
16
7bf1302 Christophe Coevoet Changed the namespace to Doctrine\Bundle\MongoDBBundle
stof authored
17 use Doctrine\Bundle\MongoDBBundle\DependencyInjection\Compiler\CreateHydratorDirectoryPass;
18 use Doctrine\Bundle\MongoDBBundle\DependencyInjection\Compiler\CreateProxyDirectoryPass;
19 use Doctrine\Bundle\MongoDBBundle\DependencyInjection\Compiler\EventManagerPass;
20 use Doctrine\Bundle\MongoDBBundle\DependencyInjection\DoctrineMongoDBExtension;
bba3fe2 Christophe Coevoet Added a user provider
stof authored
21 use Symfony\Bridge\Doctrine\DependencyInjection\Security\UserProvider\EntityFactory;
a97293b Kris Wallsmith sorted use statements
kriswallsmith authored
22 use Symfony\Component\DependencyInjection\Compiler\PassConfig;
23 use Symfony\Component\DependencyInjection\ContainerBuilder;
24 use Symfony\Component\HttpKernel\Bundle\Bundle;
577df30 Fabien Potencier renamed Symfony\Framework to Symfony\Bundle
fabpot authored
25
26 /**
27 * Doctrine MongoDB ODM bundle.
28 *
62f4fce Jeremy Mikola Update author attribution for Bulat
jmikola authored
29 * @author Bulat Shakirzyanov <mallluhuct@gmail.com>
03f2979 Kris Wallsmith updated email address
kriswallsmith authored
30 * @author Kris Wallsmith <kris@symfony.com>
577df30 Fabien Potencier renamed Symfony\Framework to Symfony\Bundle
fabpot authored
31 * @author Jonathan H. Wage <jonwage@gmail.com>
32 */
4a92955 Bulat Shakirzyanov [DoctrineMongoDBBundle] removed trailing space
avalanche123 authored
33 class DoctrineMongoDBBundle extends Bundle
577df30 Fabien Potencier renamed Symfony\Framework to Symfony\Bundle
fabpot authored
34 {
5842458 Fabien Potencier added the concept of a main DIC extension for bundles
fabpot authored
35 public function build(ContainerBuilder $container)
9a8c63a Bulat Shakirzyanov [DoctrineMongoDBBundle] switched to compiler passes for proxy/hydrator d...
avalanche123 authored
36 {
d9e1a24 Kris Wallsmith cleaned up event manager pass
kriswallsmith authored
37 $container->addCompilerPass(new EventManagerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION);
9a8c63a Bulat Shakirzyanov [DoctrineMongoDBBundle] switched to compiler passes for proxy/hydrator d...
avalanche123 authored
38 $container->addCompilerPass(new CreateProxyDirectoryPass(), PassConfig::TYPE_BEFORE_REMOVING);
39 $container->addCompilerPass(new CreateHydratorDirectoryPass(), PassConfig::TYPE_BEFORE_REMOVING);
bba3fe2 Christophe Coevoet Added a user provider
stof authored
40
41 if ($container->hasExtension('security')) {
42 $container->getExtension('security')->addUserProviderFactory(new EntityFactory('mongodb', 'doctrine.odm.mongodb.security.user.provider'));
43 }
9a8c63a Bulat Shakirzyanov [DoctrineMongoDBBundle] switched to compiler passes for proxy/hydrator d...
avalanche123 authored
44 }
6f9a3aa Kris Wallsmith changed yaml extension alias from "doctrine_mongo_db" to "doctrine_mongo...
kriswallsmith authored
45
46 public function getContainerExtension()
47 {
48 return new DoctrineMongoDBExtension();
49 }
22d95dd Fabien Potencier [DoctrineMongoDBBundle] removed DoctrineMongoDBExtension constructor
fabpot authored
50 }
Something went wrong with that request. Please try again.