1 | <?php |
||
20 | abstract class AbstractEvent implements Event |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * @var EventId |
||
25 | */ |
||
26 | protected $eventId; |
||
27 | |||
28 | /** |
||
29 | * @var DateTimeImmutable |
||
30 | */ |
||
31 | protected $occurredOn; |
||
32 | |||
33 | /** |
||
34 | * Creates an Abstract Event |
||
35 | */ |
||
36 | public function __construct() |
||
41 | |||
42 | /** |
||
43 | * Event identifier |
||
44 | * |
||
45 | * @return EventId |
||
46 | */ |
||
47 | public function eventId(): EventId |
||
51 | |||
52 | /** |
||
53 | * The date and time that event has occurred |
||
54 | * |
||
55 | * @return DateTimeImmutable |
||
56 | */ |
||
57 | public function occurredOn(): DateTimeImmutable |
||
61 | } |
||
62 |