1 | <?php |
||
18 | abstract class AbstractProjector implements EventListenerInterface |
||
19 | { |
||
20 | use DelegateEventHandlingToSpecificMethodTrait { |
||
21 | DelegateEventHandlingToSpecificMethodTrait::handle as handleSpecific; |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @param DomainMessage $domainMessage |
||
26 | */ |
||
27 | public function handle(DomainMessage $domainMessage) |
||
50 | |||
51 | /** |
||
52 | * @param LabelEventInterface $labelAdded |
||
53 | * @param Metadata $metadata |
||
54 | */ |
||
55 | abstract public function applyLabelAdded(LabelEventInterface $labelAdded, Metadata $metadata); |
||
56 | |||
57 | /** |
||
58 | * @param LabelEventInterface $labelRemoved |
||
59 | * @param Metadata $metadata |
||
60 | */ |
||
61 | abstract public function applyLabelRemoved(LabelEventInterface $labelRemoved, Metadata $metadata); |
||
62 | |||
63 | /** |
||
64 | * @param LabelsImportedEventInterface $labelsImported |
||
65 | * @param Metadata $metadata |
||
66 | */ |
||
67 | abstract public function applyLabelsImported(LabelsImportedEventInterface $labelsImported, Metadata $metadata); |
||
68 | |||
69 | /** |
||
70 | * @param $payload |
||
71 | * @return bool |
||
72 | */ |
||
73 | private function isLabelAdded($payload) |
||
78 | |||
79 | /** |
||
80 | * @param $payload |
||
81 | * @return bool |
||
82 | */ |
||
83 | private function isLabelRemoved($payload) |
||
88 | |||
89 | /** |
||
90 | * @param $payload |
||
91 | * @return bool |
||
92 | */ |
||
93 | private function isLabelsImported($payload) |
||
98 | } |
||
99 |