1 | <?php |
||
24 | abstract class AbstractEntity implements EntityInterface |
||
25 | { |
||
26 | use SerializerTrait, DeserializerTrait, DomainEventDispatcherTrait, StateTrait, MessageMapperTrait; |
||
27 | |||
28 | /** |
||
29 | * @var AggregateRootInterface |
||
30 | */ |
||
31 | protected $aggregateRoot; |
||
32 | |||
33 | /** |
||
34 | * @var bool |
||
35 | */ |
||
36 | private $terminated = false; |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | public function registerAggregateRoot(AggregateRootInterface $aggregateRoot) |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | public function apply(DomainEventInterface $event) |
||
65 | |||
66 | /** |
||
67 | * Get aggregate root. |
||
68 | * |
||
69 | * @return AggregateRootInterface |
||
70 | */ |
||
71 | public function getAggregateRoot() |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | protected function terminate() |
||
83 | } |
||
84 |