Completed
Push — master ( 9d9484...761485 )
by Alexandre
01:59
created

MongoDBRepository::getManager()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Black\Bridge\Doctrine\Common\Persistence\MongoDB;
4
5
use Doctrine\Common\Persistence\ObjectManager;
6
7
/**
8
 * Class MongoDBRepository
9
 */
10
class MongoDBRepository
11
{
12
    /**
13
     * @var
14
     */
15
    protected $manager;
16
17
    /**
18
     * @var
19
     */
20
    protected $class;
21
22
    /**
23
     * @param ObjectManager $manager
24
     * @param $class
25
     */
26
    public function __construct(ObjectManager $manager, $class)
27
    {
28
        $this->manager = $manager;
29
        $this->class = $class;
30
    }
31
32
     /**
33
     * @return mixed
34
     */
35
    public function getClassName()
36
    {
37
        return $this->class;
38
    }
39
40
    /**
41
     * @return mixed
42
     */
43
    protected function getManager()
44
    {
45
        return $this->manager;
46
    }
47
48
    /**
49
     * @return mixed
50
     */
51
     public function createQueryBuilder()
52
     {
53
         return $this->manager->createQueryBuilder($this->class);
54
     }
55
}
56