Completed
Pull Request — master (#130)
by Kristof
23:10 queued 14:24
created

PurgeServiceManager::getReadModelPurgeServices()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace CultuurNet\UDB3\Storage;
4
5
/**
6
 * Class PurgeServiceManager
7
 * @package CultuurNet\UDB3\Storage
8
 */
9
class PurgeServiceManager
10
{
11
    /**
12
     * @var PurgeServiceInterface[]
13
     */
14
    private $readModelPurgeServices;
15
16
    /**
17
     * @var PurgeServiceInterface[]
18
     */
19
    private $writeModelPurgeServices;
20
21
    /**
22
     * PurgeServiceManager constructor.
23
     */
24
    public function __construct()
25
    {
26
        $this->readModelPurgeServices = array();
27
28
        $this->writeModelPurgeServices = array();
29
    }
30
31
    /**
32
     * @param PurgeServiceInterface $purgeService
33
     */
34
    public function addReadModelPurgeService(PurgeServiceInterface $purgeService)
35
    {
36
        $this->readModelPurgeServices[] = $purgeService;
37
    }
38
39
    /**
40
     * @return PurgeServiceInterface[]
41
     */
42
    public function getReadModelPurgeServices()
43
    {
44
        return $this->readModelPurgeServices;
45
    }
46
47
    /**
48
     * @param PurgeServiceInterface $purgeService
49
     */
50
    public function addWriteModelPurgeService(PurgeServiceInterface $purgeService)
51
    {
52
        $this->writeModelPurgeServices[] = $purgeService;
53
    }
54
55
    /**
56
     * @return PurgeServiceInterface[]
57
     */
58
    public function getWriteModelPurgeServices()
59
    {
60
        return $this->writeModelPurgeServices;
61
    }
62
}
63