RegisterDriverMetadataEventArgs::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
/**
3
 * This file is part of the Cubiche package.
4
 *
5
 * Copyright (c) Cubiche
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Cubiche\Infrastructure\Doctrine\ODM\MongoDB\Event;
12
13
use Cubiche\Infrastructure\Doctrine\ODM\MongoDB\Metadata\Factory\DriverFactory;
14
use Doctrine\Common\Persistence\ObjectManager;
15
use Doctrine\ODM\MongoDB\Event\ManagerEventArgs;
16
17
/**
18
 * RegisterDriverMetadataEventArgs class.
19
 *
20
 * @author Ivannis Suárez Jerez <[email protected]>
21
 */
22
class RegisterDriverMetadataEventArgs extends ManagerEventArgs
23
{
24
    /**
25
     * @var DriverFactory
26
     */
27
    protected $driverFactory;
28
29
    /**
30
     * RegisterDriverMetadataEventArgs constructor.
31
     *
32
     * @param DriverFactory $driverFactory
33
     * @param ObjectManager $objectManager
34
     */
35
    public function __construct(DriverFactory $driverFactory, ObjectManager $objectManager)
36
    {
37
        parent::__construct($objectManager);
38
39
        $this->driverFactory = $driverFactory;
40
    }
41
42
    /**
43
     * @return DriverFactory
44
     */
45
    public function driverFactory()
46
    {
47
        return $this->driverFactory;
48
    }
49
}
50