Completed
Push — master ( ffb817...d11e08 )
by Christian
03:09
created

StatementRepository::storeMappedStatement()   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 2
1
<?php
2
3
/*
4
 * This file is part of the xAPI package.
5
 *
6
 * (c) Christian Flothmann <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace XApi\Repository\Doctrine\Repository;
13
14
use XApi\Repository\Api\StatementRepository as BaseStatementRepository;
15
use XApi\Repository\Api\Mapping\MappedStatement;
16
17
/**
18
 * Doctrine based {@link Statement} repository.
19
 *
20
 * @author Christian Flothmann <[email protected]>
21
 */
22
class StatementRepository extends BaseStatementRepository
23
{
24
    /**
25
     * @var MappedStatementRepository The statement repository
26
     */
27
    private $repository;
28
29
    public function __construct(MappedStatementRepository $repository)
30
    {
31
        $this->repository = $repository;
32
    }
33
34
    /**
35
     * {@inheritDoc}
36
     */
37
    protected function findMappedStatement(array $criteria)
38
    {
39
        return $this->repository->findMappedStatement($criteria);
40
    }
41
42
    /**
43
     * {@inheritDoc}
44
     */
45
    protected function findMappedStatements(array $criteria)
46
    {
47
        return $this->repository->findMappedStatements($criteria);
48
    }
49
50
    /**
51
     * {@inheritDoc}
52
     */
53
    protected function storeMappedStatement(MappedStatement $mappedStatement, $flush)
54
    {
55
        $this->repository->storeMappedStatement($mappedStatement, $flush);
56
    }
57
}
58