1 | <?php |
||
19 | class Projector implements EventListenerInterface |
||
20 | { |
||
21 | use DelegateEventHandlingToSpecificMethodTrait; |
||
22 | |||
23 | /** |
||
24 | * @var RepositoryInterface |
||
25 | */ |
||
26 | protected $repository; |
||
27 | |||
28 | /** |
||
29 | * @var EventCdbIdExtractorInterface |
||
30 | */ |
||
31 | protected $cdbIdExtractor; |
||
32 | |||
33 | /** |
||
34 | * @param RepositoryInterface $repository |
||
35 | * @param EventCdbIdExtractorInterface $cdbIdExtractor |
||
36 | */ |
||
37 | public function __construct( |
||
44 | |||
45 | /** |
||
46 | * @param EventImportedFromUDB2 $event |
||
47 | */ |
||
48 | protected function applyEventImportedFromUDB2(EventImportedFromUDB2 $event) |
||
52 | |||
53 | /** |
||
54 | * @param EventUpdatedFromUDB2 $event |
||
55 | */ |
||
56 | protected function applyEventUpdatedFromUDB2(EventUpdatedFromUDB2 $event) |
||
60 | |||
61 | /** |
||
62 | * @param EventImportedFromUDB2|EventUpdatedFromUDB2 $event |
||
63 | */ |
||
64 | protected function applyEventDataFromUDB2($event) |
||
78 | |||
79 | /** |
||
80 | * @param EventCreated $event |
||
81 | */ |
||
82 | protected function applyEventCreated(EventCreated $event) |
||
94 | |||
95 | /** |
||
96 | * @param EventCopied $eventCopied |
||
97 | */ |
||
98 | protected function applyEventCopied(EventCopied $eventCopied) |
||
110 | |||
111 | /** |
||
112 | * @param MajorInfoUpdated $majorInfoUpdated |
||
113 | */ |
||
114 | protected function applyMajorInfoUpdated(MajorInfoUpdated $majorInfoUpdated) |
||
120 | |||
121 | /** |
||
122 | * @param LocationUpdated $locationUpdated |
||
123 | */ |
||
124 | protected function applyLocationUpdated(LocationUpdated $locationUpdated) |
||
130 | |||
131 | /** |
||
132 | * Delete the relations. |
||
133 | * @param EventDeleted $event |
||
134 | */ |
||
135 | protected function applyEventDeleted(EventDeleted $event) |
||
141 | |||
142 | /** |
||
143 | * Store the relation when the organizer was changed |
||
144 | * @param OrganizerUpdated $organizerUpdated |
||
145 | */ |
||
146 | protected function applyOrganizerUpdated(OrganizerUpdated $organizerUpdated) |
||
150 | |||
151 | /** |
||
152 | * Remove the relation. |
||
153 | * @param OrganizerDeleted $organizerDeleted |
||
154 | */ |
||
155 | protected function applyOrganizerDeleted(OrganizerDeleted $organizerDeleted) |
||
159 | |||
160 | /** |
||
161 | * @param string $eventId |
||
162 | * @param string $placeId |
||
163 | * @param string $organizerId |
||
164 | */ |
||
165 | protected function storeRelations($eventId, $placeId, $organizerId) |
||
169 | } |
||
170 |