1 | <?php |
||
21 | class DomainEvent extends Event implements DomainEventInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | private $metadata = []; |
||
27 | |||
28 | /** |
||
29 | * @var array |
||
30 | */ |
||
31 | private $payload = []; |
||
32 | |||
33 | /** |
||
34 | * DomainEvent constructor. |
||
35 | */ |
||
36 | public function __construct() |
||
40 | |||
41 | /** |
||
42 | * @return DateTime |
||
43 | */ |
||
44 | public function occurredOn() |
||
48 | |||
49 | /** |
||
50 | * @param string $property |
||
51 | * @param mixed $value |
||
52 | */ |
||
53 | protected function setMetadata($property, $value) |
||
57 | |||
58 | /** |
||
59 | * @param string $property |
||
60 | * |
||
61 | * @return mixed |
||
62 | */ |
||
63 | protected function getMetadata($property) |
||
67 | |||
68 | /** |
||
69 | * @param string $property |
||
70 | * @param mixed $value |
||
71 | */ |
||
72 | protected function setPayload($property, $value) |
||
76 | |||
77 | /** |
||
78 | * @param string $property |
||
79 | * |
||
80 | * @return mixed |
||
81 | */ |
||
82 | protected function getPayload($property) |
||
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | */ |
||
90 | public static function fromArray(array $data) |
||
103 | |||
104 | /** |
||
105 | * {@inheritdoc} |
||
106 | */ |
||
107 | public function toArray() |
||
115 | } |
||
116 |