Failed Conditions
Push — master ( 07d765...457451 )
by Jonathan
39s
created

ManagerEventArgs::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
crap 2
1
<?php
2
namespace Doctrine\Common\Persistence\Event;
3
4
use Doctrine\Common\EventArgs;
5
use Doctrine\Common\Persistence\ObjectManager;
6
7
/**
8
 * Provides event arguments for the preFlush event.
9
 *
10
 * @link   www.doctrine-project.org
11
 * @since  2.2
12
 * @author Roman Borschel <[email protected]>
13
 * @author Benjamin Eberlei <[email protected]>
14
 */
15
class ManagerEventArgs extends EventArgs
16
{
17
    /**
18
     * @var ObjectManager
19
     */
20
    private $objectManager;
21
22
    /**
23
     * Constructor.
24
     *
25
     * @param ObjectManager $objectManager
26
     */
27
    public function __construct(ObjectManager $objectManager)
28
    {
29
        $this->objectManager = $objectManager;
30
    }
31
32
    /**
33
     * Retrieves the associated ObjectManager.
34
     *
35
     * @return ObjectManager
36
     */
37
    public function getObjectManager()
38
    {
39
        return $this->objectManager;
40
    }
41
}
42