-
Notifications
You must be signed in to change notification settings - Fork 17
/
CraueGeoBundle.php
35 lines (28 loc) · 979 Bytes
/
CraueGeoBundle.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace Craue\GeoBundle;
use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* @author Christian Raue <[email protected]>
* @copyright 2011-2022 Christian Raue
* @license http://opensource.org/licenses/mit-license.php MIT License
*/
class CraueGeoBundle extends Bundle {
/**
* {@inheritDoc}
*/
public function build(ContainerBuilder $container) {
parent::build($container);
$this->addRegisterMappingsPass($container);
}
/**
* @param ContainerBuilder $container
*/
private function addRegisterMappingsPass(ContainerBuilder $container) {
$mappings = [
realpath(__DIR__ . '/Resources/config/doctrine-mapping') => 'Craue\GeoBundle\Entity',
];
$container->addCompilerPass(DoctrineOrmMappingsPass::createXmlMappingDriver($mappings, [], 'craue_geo.register_entity.postal_code'));
}
}