1 | <?php |
||
7 | class DomainEvent implements Message |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | protected $origin; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $name; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $version; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | */ |
||
27 | protected $occurredOn; |
||
28 | |||
29 | /** |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $body = array(); |
||
33 | |||
34 | /** |
||
35 | * @var bool |
||
36 | */ |
||
37 | protected $isDeprecated = false; |
||
38 | |||
39 | /** |
||
40 | * @param string $origin |
||
41 | * @param string $name |
||
42 | * @param string $version |
||
43 | * @param int $occurredOn |
||
44 | * @param array $body |
||
45 | * @param bool $isDeprecated |
||
46 | */ |
||
47 | public function __construct($origin, $name, $version, $occurredOn, array $body = [], $isDeprecated = false) |
||
56 | |||
57 | /** |
||
58 | * @return string |
||
59 | */ |
||
60 | public function getOrigin() |
||
64 | |||
65 | /** |
||
66 | * @return string |
||
67 | */ |
||
68 | public function getName() |
||
72 | |||
73 | /** |
||
74 | * @return string |
||
75 | */ |
||
76 | public function getVersion() |
||
80 | |||
81 | /** |
||
82 | * Timestamp |
||
83 | * |
||
84 | * @return int |
||
85 | */ |
||
86 | public function getOccurredOn() |
||
90 | |||
91 | /** |
||
92 | * @return array |
||
93 | */ |
||
94 | public function getBody() |
||
98 | |||
99 | /** |
||
100 | * @return int |
||
101 | */ |
||
102 | public function getDelay() |
||
106 | |||
107 | /** |
||
108 | * @return bool |
||
109 | */ |
||
110 | public function isDeprecated() |
||
114 | |||
115 | /** |
||
116 | * @param string $origin |
||
117 | * @return DomainEvent $this |
||
118 | * @throws DomainEventException |
||
119 | */ |
||
120 | protected function setOrigin($origin) |
||
128 | |||
129 | /** |
||
130 | * @param string $name |
||
131 | * @return DomainEvent $this |
||
132 | * @throws DomainEventException |
||
133 | */ |
||
134 | protected function setName($name) |
||
142 | |||
143 | /** |
||
144 | * @param string $version |
||
145 | * @return DomainEvent $this |
||
146 | * @throws DomainEventException |
||
147 | */ |
||
148 | protected function setVersion($version) |
||
156 | |||
157 | /** |
||
158 | * @param int $occurredOn |
||
159 | * @return DomainEvent $this |
||
160 | * @throws DomainEventException |
||
161 | */ |
||
162 | protected function setOccurredOn($occurredOn) |
||
175 | |||
176 | /** |
||
177 | * @return array |
||
178 | */ |
||
179 | public function jsonSerialize() |
||
190 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.