1 | <?php |
||
32 | class PlaceCommandFactory implements OfferCommandFactoryInterface |
||
33 | { |
||
34 | /** |
||
35 | * @param $id |
||
36 | * @param Label $label |
||
37 | * @return AddLabel |
||
38 | */ |
||
39 | public function createAddLabelCommand($id, Label $label) |
||
40 | { |
||
41 | return new AddLabel($id, $label); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @param $id |
||
46 | * @param Label $label |
||
47 | * @return RemoveLabel |
||
48 | */ |
||
49 | public function createRemoveLabelCommand($id, Label $label) |
||
50 | { |
||
51 | return new RemoveLabel($id, $label); |
||
52 | } |
||
53 | |||
54 | |||
55 | public function createAddImageCommand($id, Image $image) |
||
56 | { |
||
57 | return new AddImage($id, $image); |
||
58 | } |
||
59 | |||
60 | public function createRemoveImageCommand($id, Image $image) |
||
61 | { |
||
62 | return new RemoveImage($id, $image); |
||
63 | } |
||
64 | |||
65 | public function createUpdateImageCommand( |
||
66 | $id, |
||
67 | UUID $mediaObjectId, |
||
68 | StringLiteral $description, |
||
69 | StringLiteral $copyrightHolder |
||
70 | ) { |
||
71 | return new UpdateImage( |
||
72 | $id, |
||
73 | $mediaObjectId, |
||
74 | $description, |
||
75 | $copyrightHolder |
||
76 | ); |
||
77 | } |
||
78 | |||
79 | public function createSelectMainImage($id, Image $image) |
||
80 | { |
||
81 | return new SelectMainImage($id, $image); |
||
82 | } |
||
83 | |||
84 | /** |
||
85 | * @param $id |
||
86 | * @param Language $language |
||
87 | * @param StringLiteral $title |
||
88 | * @return AbstractUpdateTitle |
||
89 | */ |
||
90 | public function createUpdateTitleCommand($id, Language $language, StringLiteral $title) |
||
91 | { |
||
92 | return new UpdateTitle($id, $language, $title); |
||
93 | } |
||
94 | |||
95 | /** |
||
96 | * @param $id |
||
97 | * @param Language $language |
||
98 | * @param Description $description |
||
99 | * @return AbstractUpdateDescription |
||
100 | */ |
||
101 | public function createUpdateDescriptionCommand($id, Language $language, Description $description) |
||
102 | { |
||
103 | return new UpdateDescription($id, $language, $description); |
||
104 | } |
||
105 | |||
106 | /** |
||
107 | * @inheritdoc |
||
108 | */ |
||
109 | public function createUpdateCalendarCommand($id, Calendar $calendar) |
||
110 | { |
||
111 | return new UpdateCalendar($id, $calendar); |
||
112 | } |
||
113 | |||
114 | /** |
||
115 | * @param $id |
||
116 | * @param Image $image |
||
117 | * @return AbstractSelectMainImage |
||
118 | */ |
||
119 | public function createSelectMainImageCommand($id, Image $image) |
||
120 | { |
||
121 | return new SelectMainImage($id, $image); |
||
122 | } |
||
123 | |||
124 | /** |
||
125 | * @param string $id |
||
126 | * @param AgeRange $ageRange |
||
127 | * @return AbstractUpdateTypicalAgeRange |
||
128 | */ |
||
129 | public function createUpdateTypicalAgeRangeCommand($id, AgeRange $ageRange) |
||
133 | |||
134 | /** |
||
135 | * @param string $id |
||
136 | * @return AbstractDeleteTypicalAgeRange |
||
137 | */ |
||
138 | public function createDeleteTypicalAgeRangeCommand($id) |
||
142 | |||
143 | /** |
||
144 | * @param string $id |
||
145 | * @param string $organizerId |
||
146 | * @return AbstractUpdateOrganizer |
||
147 | */ |
||
148 | public function createUpdateOrganizerCommand($id, $organizerId) |
||
152 | |||
153 | /** |
||
154 | * @param string $id |
||
155 | * @param string $organizerId |
||
156 | * @return AbstractDeleteOrganizer |
||
157 | */ |
||
158 | public function createDeleteOrganizerCommand($id, $organizerId) |
||
162 | |||
163 | /** |
||
164 | * @param string $id |
||
165 | * @param ContactPoint $contactPoint |
||
166 | * @return AbstractUpdateContactPoint |
||
167 | */ |
||
168 | public function createUpdateContactPointCommand($id, ContactPoint $contactPoint) |
||
172 | |||
173 | /** |
||
174 | * @param string $id |
||
175 | * @param BookingInfo $bookingInfo |
||
176 | * @return AbstractUpdateBookingInfo |
||
177 | */ |
||
178 | public function createUpdateBookingInfoCommand($id, BookingInfo $bookingInfo) |
||
182 | |||
183 | /** |
||
184 | * @param $id |
||
185 | * @param PriceInfo $priceInfo |
||
186 | * @return UpdatePriceInfo |
||
187 | */ |
||
188 | public function createUpdatePriceInfoCommand($id, PriceInfo $priceInfo) |
||
192 | |||
193 | /** |
||
194 | * @param string $id |
||
195 | * @return AbstractDeleteOffer |
||
196 | */ |
||
197 | public function createDeleteOfferCommand($id) |
||
201 | |||
202 | /** |
||
203 | * @param string $id |
||
204 | * @return Approve |
||
205 | */ |
||
206 | public function createApproveCommand($id) |
||
207 | { |
||
208 | return new Approve($id); |
||
209 | } |
||
210 | |||
211 | /** |
||
212 | * @param string $id |
||
213 | * @param StringLiteral $reason |
||
214 | * @return Reject |
||
215 | */ |
||
216 | public function createRejectCommand($id, StringLiteral $reason) |
||
217 | { |
||
218 | return new Reject($id, $reason); |
||
219 | } |
||
220 | |||
221 | /** |
||
222 | * @param string $id |
||
223 | * @return FlagAsInappropriate |
||
224 | */ |
||
225 | public function createFlagAsInappropriate($id) |
||
229 | |||
230 | /** |
||
231 | * @param string $id |
||
232 | * @return FlagAsDuplicate |
||
233 | */ |
||
234 | public function createFlagAsDuplicate($id) |
||
238 | } |
||
239 |