1 | <?php |
||
10 | final class DoSomething implements Command |
||
11 | { |
||
12 | /** |
||
13 | * @var PointInTime |
||
14 | */ |
||
15 | private $timeOfRequest; |
||
16 | |||
17 | /** |
||
18 | * @var AggregateRootId |
||
19 | */ |
||
20 | private $aggregateRootId; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $reason; |
||
26 | |||
27 | public function __construct( |
||
28 | AggregateRootId $aggregateRootId, |
||
29 | PointInTime $timeOfRequest, |
||
30 | string $reason |
||
31 | ) { |
||
32 | $this->aggregateRootId = $aggregateRootId; |
||
33 | $this->timeOfRequest = $timeOfRequest; |
||
34 | $this->reason = $reason; |
||
35 | } |
||
36 | |||
37 | public function timeOfRequest(): PointInTime |
||
38 | { |
||
39 | return $this->timeOfRequest; |
||
40 | } |
||
41 | |||
42 | public function aggregateRootId(): AggregateRootId |
||
43 | { |
||
44 | return $this->aggregateRootId; |
||
45 | } |
||
46 | |||
47 | public function reason(): string |
||
48 | { |
||
49 | return $this->reason; |
||
50 | } |
||
51 | |||
52 | } |
||
53 |