1 | <?php |
||
18 | class Projector implements EventListenerInterface |
||
19 | { |
||
20 | use DelegateEventHandlingToSpecificMethodTrait; |
||
21 | |||
22 | /** |
||
23 | * @var RepositoryInterface |
||
24 | */ |
||
25 | protected $repository; |
||
26 | |||
27 | /** |
||
28 | * @var EventCdbIdExtractorInterface |
||
29 | */ |
||
30 | protected $cdbIdExtractor; |
||
31 | |||
32 | /** |
||
33 | * @param RepositoryInterface $repository |
||
34 | * @param EventCdbIdExtractorInterface $cdbIdExtractor |
||
35 | */ |
||
36 | public function __construct( |
||
43 | |||
44 | /** |
||
45 | * @param EventImportedFromUDB2 $event |
||
46 | */ |
||
47 | protected function applyEventImportedFromUDB2(EventImportedFromUDB2 $event) |
||
51 | |||
52 | /** |
||
53 | * @param EventUpdatedFromUDB2 $event |
||
54 | */ |
||
55 | protected function applyEventUpdatedFromUDB2(EventUpdatedFromUDB2 $event) |
||
59 | |||
60 | /** |
||
61 | * @param EventImportedFromUDB2|EventUpdatedFromUDB2 $event |
||
62 | */ |
||
63 | protected function applyEventDataFromUDB2($event) |
||
77 | |||
78 | /** |
||
79 | * @param EventCreated $event |
||
80 | */ |
||
81 | protected function applyEventCreated(EventCreated $event) |
||
93 | |||
94 | /** |
||
95 | * @param EventCopied $eventCopied |
||
96 | */ |
||
97 | protected function applyEventCopied(EventCopied $eventCopied) |
||
109 | |||
110 | /** |
||
111 | * @param MajorInfoUpdated $majorInfoUpdated |
||
112 | */ |
||
113 | protected function applyMajorInfoUpdated(MajorInfoUpdated $majorInfoUpdated) |
||
119 | |||
120 | /** |
||
121 | * Delete the relations. |
||
122 | * @param EventDeleted $event |
||
123 | */ |
||
124 | protected function applyEventDeleted(EventDeleted $event) |
||
130 | |||
131 | /** |
||
132 | * Store the relation when the organizer was changed |
||
133 | * @param OrganizerUpdated $organizerUpdated |
||
134 | */ |
||
135 | protected function applyOrganizerUpdated(OrganizerUpdated $organizerUpdated) |
||
139 | |||
140 | /** |
||
141 | * Remove the relation. |
||
142 | * @param OrganizerDeleted $organizerDeleted |
||
143 | */ |
||
144 | protected function applyOrganizerDeleted(OrganizerDeleted $organizerDeleted) |
||
148 | |||
149 | /** |
||
150 | * @param string $eventId |
||
151 | * @param string $placeId |
||
152 | * @param string $organizerId |
||
153 | */ |
||
154 | protected function storeRelations($eventId, $placeId, $organizerId) |
||
158 | } |
||
159 |