Completed
Push — master ( e9cd97...23520c )
by Rafał
23:17
created

SWPBridgeBundle::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 2
Metric Value
c 2
b 1
f 2
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
/**
4
 * This file is part of the Superdesk Web Publisher Bridge Bundle.
5
 *
6
 * Copyright 2016 Sourcefabric z.ú. and contributors.
7
 *
8
 * For the full copyright and license information, please see the
9
 * AUTHORS and LICENSE files distributed with this source code.
10
 *
11
 * @copyright 2016 Sourcefabric z.ú.
12
 * @license http://www.superdesk.org/license
13
 */
14
namespace SWP\Bundle\BridgeBundle;
15
16
use SWP\Bundle\BridgeBundle\DependencyInjection\Compiler\TransformersCompilerPass;
17
use SWP\Bundle\BridgeBundle\DependencyInjection\Compiler\ValidatorsCompilerPass;
18
use SWP\Bundle\StorageBundle\DependencyInjection\Bundle\Bundle;
19
use SWP\Bundle\StorageBundle\Drivers;
20
use Symfony\Component\DependencyInjection\ContainerBuilder;
21
22
class SWPBridgeBundle extends Bundle
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function build(ContainerBuilder $container)
28
    {
29
        parent::build($container);
30
        $container->addCompilerPass(new ValidatorsCompilerPass());
31
        $container->addCompilerPass(new TransformersCompilerPass());
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function getSupportedDrivers()
38
    {
39
        return [
40
            Drivers::DRIVER_DOCTRINE_ORM,
41
        ];
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function getModelClassNamespace()
48
    {
49
        return 'SWP\Component\Bridge\Model';
50
    }
51
}
52