1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace MGDigital\BusQue; |
4
|
|
|
|
5
|
|
|
final class Implementation |
6
|
|
|
{ |
7
|
|
|
|
8
|
|
|
private $queueResolver; |
9
|
|
|
private $commandSerializer; |
10
|
|
|
private $commandIdGenerator; |
11
|
|
|
private $queueDriver; |
12
|
|
|
private $schedulerDriver; |
13
|
|
|
private $clock; |
14
|
|
|
private $commandBusAdapter; |
15
|
|
|
|
16
|
24 |
|
public function __construct( |
17
|
|
|
QueueResolverInterface $queueResolver, |
18
|
|
|
CommandSerializerInterface $commandSerializer, |
19
|
|
|
CommandIdGeneratorInterface $commandIdGenerator, |
20
|
|
|
QueueDriverInterface $queueDriver, |
21
|
|
|
SchedulerDriverInterface $schedulerDriver, |
22
|
|
|
ClockInterface $clock, |
23
|
|
|
CommandBusAdapterInterface $commandBusAdapter |
24
|
|
|
) { |
25
|
24 |
|
$this->queueResolver = $queueResolver; |
26
|
24 |
|
$this->commandSerializer = $commandSerializer; |
27
|
24 |
|
$this->commandIdGenerator = $commandIdGenerator; |
28
|
24 |
|
$this->queueDriver = $queueDriver; |
29
|
24 |
|
$this->schedulerDriver = $schedulerDriver; |
30
|
24 |
|
$this->clock = $clock; |
31
|
24 |
|
$this->commandBusAdapter = $commandBusAdapter; |
32
|
24 |
|
} |
33
|
|
|
|
34
|
4 |
|
public function getQueueResolver(): QueueResolverInterface |
35
|
|
|
{ |
36
|
4 |
|
return $this->queueResolver; |
37
|
|
|
} |
38
|
|
|
|
39
|
8 |
|
public function getCommandSerializer(): CommandSerializerInterface |
40
|
|
|
{ |
41
|
8 |
|
return $this->commandSerializer; |
42
|
|
|
} |
43
|
|
|
|
44
|
3 |
|
public function getCommandIdGenerator(): CommandIdGeneratorInterface |
45
|
|
|
{ |
46
|
3 |
|
return $this->commandIdGenerator; |
47
|
|
|
} |
48
|
|
|
|
49
|
12 |
|
public function getQueueDriver(): QueueDriverInterface |
50
|
|
|
{ |
51
|
12 |
|
return $this->queueDriver; |
52
|
|
|
} |
53
|
|
|
|
54
|
2 |
|
public function getSchedulerDriver(): SchedulerDriverInterface |
55
|
|
|
{ |
56
|
2 |
|
return $this->schedulerDriver; |
57
|
|
|
} |
58
|
|
|
|
59
|
1 |
|
public function getClock(): ClockInterface |
60
|
|
|
{ |
61
|
1 |
|
return $this->clock; |
62
|
|
|
} |
63
|
|
|
|
64
|
4 |
|
public function getCommandBusAdapter(): CommandBusAdapterInterface |
65
|
|
|
{ |
66
|
4 |
|
return $this->commandBusAdapter; |
67
|
|
|
} |
68
|
|
|
} |
69
|
|
|
|