PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.11
Booking for Appointments and Events Calendar – Amelia v1.2.11
2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / src / Infrastructure / ContainerConfig / application.services.php
ameliabooking / src / Infrastructure / ContainerConfig Last commit date
application.services.php 1 year ago command.bus.php 2 years ago container.php 1 year ago domain.event.bus.php 7 years ago domain.services.php 2 years ago infrastructure.services.php 1 year ago infrastructure.user.php 7 years ago repositories.php 2 years ago request.php 1 year ago
application.services.php
521 lines
1 <?php
2 /**
3 * Assembling application services:
4 * Instantiating application services and injecting the Infrastructure layer implementations
5 */
6
7 use AmeliaBooking\Application\Services\Bookable\AbstractPackageApplicationService;
8 use AmeliaBooking\Application\Services\Bookable\BookableApplicationService;
9 use AmeliaBooking\Application\Services\Booking\BookingApplicationService;
10 use AmeliaBooking\Application\Services\Booking\AppointmentApplicationService;
11 use AmeliaBooking\Application\Services\Booking\EventApplicationService;
12 use AmeliaBooking\Application\Services\Cache\CacheApplicationService;
13 use AmeliaBooking\Application\Services\Entity\EntityApplicationService;
14 use AmeliaBooking\Application\Services\Gallery\GalleryApplicationService;
15 use AmeliaBooking\Application\Services\Payment\PaymentApplicationService;
16 use AmeliaBooking\Application\Services\Reservation\ReservationService;
17 use AmeliaBooking\Application\Services\TimeSlot\TimeSlotService;
18 use AmeliaBooking\Application\Services\User\CustomerApplicationService;
19 use AmeliaBooking\Application\Services\User\ProviderApplicationService;
20 use AmeliaBooking\Application\Services\User\UserApplicationService;
21 use AmeliaBooking\Domain\Entity\Booking\Reservation;
22 use AmeliaBooking\Infrastructure\Common\Container;
23
24 defined('ABSPATH') or die('No script kiddies please!');
25
26 /**
27 * Entities service
28 *
29 * @param Container $c
30 *
31 * @return EntityApplicationService
32 */
33 $entries['application.entity.service'] = function ($c) {
34 return new AmeliaBooking\Application\Services\Entity\EntityApplicationService($c);
35 };
36
37 /**
38 * Customer service
39 *
40 * @param Container $c
41 *
42 * @return UserApplicationService
43 */
44 $entries['application.user.service'] = function ($c) {
45 return new AmeliaBooking\Application\Services\User\UserApplicationService($c);
46 };
47
48 /**
49 * API User Application service
50 *
51 * @param $c
52 *
53 * @return AmeliaBooking\Application\Services\User\UserApplicationService
54 */
55 $entries['application.api.user.service'] = function ($c) {
56 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getApiService(
57 $c
58 );
59 };
60
61 /**
62 * Provider service
63 *
64 * @param Container $c
65 *
66 * @return ProviderApplicationService
67 */
68 $entries['application.user.provider.service'] = function ($c) {
69 return new AmeliaBooking\Application\Services\User\ProviderApplicationService($c);
70 };
71
72 /**
73 * Customer service
74 *
75 * @param Container $c
76 *
77 * @return CustomerApplicationService
78 */
79 $entries['application.user.customer.service'] = function ($c) {
80 return new AmeliaBooking\Application\Services\User\CustomerApplicationService($c);
81 };
82
83 /**
84 * Current Location Service
85 *
86 * @return AmeliaBooking\Application\Services\Location\AbstractCurrentLocation
87 */
88 $entries['application.currentLocation.service'] = function () {
89 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getCurrentLocationService();
90 };
91
92 /**
93 * Deposit Service
94 *
95 * @param Container $c
96 *
97 * @return AmeliaBooking\Application\Services\Deposit\AbstractDepositApplicationService
98 */
99 $entries['application.deposit.service'] = function ($c) {
100 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getDepositService($c);
101 };
102
103 /**
104 * Extra Service
105 *
106 * @param Container $c
107 *
108 * @return AmeliaBooking\Application\Services\Extra\AbstractExtraApplicationService
109 */
110 $entries['application.extra.service'] = function ($c) {
111 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getExtraService($c);
112 };
113
114 /**
115 * Appointment service
116 *
117 * @param Container $c
118 *
119 * @return AppointmentApplicationService
120 */
121 $entries['application.booking.appointment.service'] = function ($c) {
122 return new AmeliaBooking\Application\Services\Booking\AppointmentApplicationService($c);
123 };
124
125 /**
126 * Event service
127 *
128 * @param Container $c
129 *
130 * @return EventApplicationService
131 */
132 $entries['application.booking.event.service'] = function ($c) {
133 return new AmeliaBooking\Application\Services\Booking\EventApplicationService($c);
134 };
135
136 /**
137 * Reservation service
138 *
139 * @param Container $c
140 *
141 * @return ReservationService
142 */
143 $entries['application.reservation.service'] = function ($c) {
144 return new AmeliaBooking\Application\Services\Reservation\ReservationService($c);
145 };
146
147 /**
148 * Reservation
149 *
150 * @param bool $validate
151 *
152 * @return Reservation
153 */
154 $entries['application.reservation'] = function ($validate) {
155 return new AmeliaBooking\Domain\Entity\Booking\Reservation($validate);
156 };
157
158 /**
159 * Appointment Reservation service
160 *
161 * @param Container $c
162 *
163 * @return AmeliaBooking\Application\Services\Reservation\AppointmentReservationService
164 */
165 $entries['application.reservation.appointment.service'] = function ($c) {
166 return new AmeliaBooking\Application\Services\Reservation\AppointmentReservationService($c);
167 };
168
169 /**
170 * Package Reservation service
171 *
172 * @param Container $c
173 *
174 * @return AmeliaBooking\Application\Services\Reservation\PackageReservationService
175 */
176 $entries['application.reservation.package.service'] = function ($c) {
177 return new AmeliaBooking\Application\Services\Reservation\PackageReservationService($c);
178 };
179
180 /**
181 * Event Reservation service
182 *
183 * @param Container $c
184 *
185 * @return AmeliaBooking\Application\Services\Reservation\EventReservationService
186 */
187 $entries['application.reservation.event.service'] = function ($c) {
188 return new AmeliaBooking\Application\Services\Reservation\EventReservationService($c);
189 };
190
191 /**
192 * Booking service
193 *
194 * @param Container $c
195 *
196 * @return BookingApplicationService
197 */
198 $entries['application.booking.booking.service'] = function ($c) {
199 return new AmeliaBooking\Application\Services\Booking\BookingApplicationService($c);
200 };
201
202 /**
203 * Bookable service
204 *
205 * @param Container $c
206 *
207 * @return BookableApplicationService
208 */
209 $entries['application.bookable.service'] = function ($c) {
210 return new AmeliaBooking\Application\Services\Bookable\BookableApplicationService($c);
211 };
212
213 /**
214 * Bookable package
215 *
216 * @param Container $c
217 *
218 * @return AbstractPackageApplicationService
219 */
220 $entries['application.bookable.package'] = function ($c) {
221 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getPackageService($c);
222 };
223
224 /**
225 * Resource service
226 *
227 * @param Container $c
228 *
229 * @return AmeliaBooking\Application\Services\Resource\AbstractResourceApplicationService
230 */
231 $entries['application.resource.service'] = function ($c) {
232 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getResourceService($c);
233 };
234
235 /**
236 * Gallery service
237 *
238 * @param Container $c
239 *
240 * @return GalleryApplicationService
241 */
242 $entries['application.gallery.service'] = function ($c) {
243 return new AmeliaBooking\Application\Services\Gallery\GalleryApplicationService($c);
244 };
245
246 /**
247 * Calendar service
248 *
249 * @param Container $c
250 *
251 * @return TimeSlotService
252 */
253 $entries['application.timeSlot.service'] = function ($c) {
254 return new AmeliaBooking\Application\Services\TimeSlot\TimeSlotService($c);
255 };
256
257 /**
258 * Cache service
259 *
260 * @param Container $c
261 *
262 * @return CacheApplicationService
263 */
264 $entries['application.cache.service'] = function ($c) {
265 return new AmeliaBooking\Application\Services\Cache\CacheApplicationService($c);
266 };
267
268 /**
269 * Tax service
270 *
271 * @param Container $c
272 *
273 * @return AmeliaBooking\Application\Services\Tax\AbstractTaxApplicationService
274 */
275 $entries['application.tax.service'] = function ($c) {
276 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getTaxService($c);
277 };
278
279 /**
280 * Coupon service
281 *
282 * @param Container $c
283 *
284 * @return AmeliaBooking\Application\Services\Coupon\AbstractCouponApplicationService
285 */
286 $entries['application.coupon.service'] = function ($c) {
287 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getCouponService($c);
288 };
289
290 /**
291 * Location Service
292 *
293 * @param Container $c
294 *
295 * @return AmeliaBooking\Application\Services\Location\AbstractLocationApplicationService
296 */
297 $entries['application.location.service'] = function ($c) {
298 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getLocationService($c);
299 };
300
301 /**
302 * Email Notification Service
303 *
304 * @param Container $c
305 *
306 * @return \AmeliaBooking\Application\Services\Notification\EmailNotificationService
307 */
308 $entries['application.emailNotification.service'] = function ($c) {
309 return new AmeliaBooking\Application\Services\Notification\EmailNotificationService($c, 'email');
310 };
311
312 /**
313 * Notification Helper Service
314 *
315 * @param Container $c
316 *
317 * @return \AmeliaBooking\Application\Services\Notification\NotificationHelperService
318 */
319 $entries['application.notificationHelper.service'] = function ($c) {
320 return new AmeliaBooking\Application\Services\Notification\NotificationHelperService($c);
321 };
322
323 /**
324 * SMS Notification Service
325 *
326 * @param Container $c
327 *
328 * @return \AmeliaBooking\Application\Services\Notification\SMSNotificationService
329 */
330 $entries['application.smsNotification.service'] = function ($c) {
331 return new AmeliaBooking\Application\Services\Notification\SMSNotificationService($c, 'sms');
332 };
333
334
335 /**
336 * WhatsApp Notification Service
337 *
338 * @param Container $c
339 *
340 * @return AmeliaBooking\Application\Services\Notification\AbstractWhatsAppNotificationService
341 */
342 $entries['application.whatsAppNotification.service'] = function ($c) {
343 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getWhatsAppNotificationService($c);
344 };
345
346 /**
347 * Appointment Notification Service
348 *
349 * @param Container $c
350 *
351 * @return \AmeliaBooking\Application\Services\Placeholder\AppointmentPlaceholderService
352 */
353 $entries['application.placeholder.appointment.service'] = function ($c) {
354 return new AmeliaBooking\Application\Services\Placeholder\AppointmentPlaceholderService($c);
355 };
356
357 /**
358 * Appointments Notification Service
359 *
360 * @param Container $c
361 *
362 * @return \AmeliaBooking\Application\Services\Placeholder\AppointmentsPlaceholderService
363 */
364 $entries['application.placeholder.appointments.service'] = function ($c) {
365 return new AmeliaBooking\Application\Services\Placeholder\AppointmentsPlaceholderService($c);
366 };
367
368 /**
369 * Package Notification Service
370 *
371 * @param Container $c
372 *
373 * @return \AmeliaBooking\Application\Services\Placeholder\PackagePlaceholderService
374 */
375 $entries['application.placeholder.package.service'] = function ($c) {
376 return new AmeliaBooking\Application\Services\Placeholder\PackagePlaceholderService($c);
377 };
378
379 /**
380 * Event Notification Service
381 *
382 * @param Container $c
383 *
384 * @return \AmeliaBooking\Application\Services\Placeholder\EventPlaceholderService
385 */
386 $entries['application.placeholder.event.service'] = function ($c) {
387 return new AmeliaBooking\Application\Services\Placeholder\EventPlaceholderService($c);
388 };
389
390 /**
391 * Stats Service
392 *
393 * @param Container $c
394 *
395 * @return \AmeliaBooking\Application\Services\Stats\StatsService
396 */
397 $entries['application.stats.service'] = function ($c) {
398 return new AmeliaBooking\Application\Services\Stats\StatsService($c);
399 };
400
401 /**
402 * Helper Service
403 *
404 * @param Container $c
405 *
406 * @return \AmeliaBooking\Application\Services\Helper\HelperService
407 */
408 $entries['application.helper.service'] = function ($c) {
409 return new AmeliaBooking\Application\Services\Helper\HelperService($c);
410 };
411
412 /**
413 * Settings Service
414 *
415 * @param Container $c
416 *
417 * @return \AmeliaBooking\Application\Services\Settings\SettingsService
418 */
419 $entries['application.settings.service'] = function ($c) {
420 return new AmeliaBooking\Application\Services\Settings\SettingsService($c);
421 };
422
423 /**
424 * SMS API Service
425 *
426 * @param Container $c
427 *
428 * @return \AmeliaBooking\Application\Services\Notification\SMSAPIService
429 */
430 $entries['application.smsApi.service'] = function ($c) {
431 return new AmeliaBooking\Application\Services\Notification\SMSAPIService($c);
432 };
433
434 /**
435 * WhatsApp Service
436 *
437 * @param Container $c
438 *
439 * @return \AmeliaBooking\Application\Services\Notification\WhatsAppService
440 */
441 $entries['application.whatsApp.service'] = function ($c) {
442 return new AmeliaBooking\Application\Services\Notification\WhatsAppService($c);
443 };
444
445 /**
446 * Payment service
447 *
448 * @param Container $c
449 *
450 * @return PaymentApplicationService
451 */
452 $entries['application.payment.service'] = function ($c) {
453 return new AmeliaBooking\Application\Services\Payment\PaymentApplicationService($c);
454 };
455
456 /**
457 * Invoice service
458 *
459 * @param Container $c
460 *
461 * @return AmeliaBooking\Application\Services\Invoice\AbstractInvoiceApplicationService
462 */
463 $entries['application.invoice.service'] = function ($c) {
464 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getInvoiceService($c);
465 };
466
467 /**
468 * Custom Field Service
469 *
470 * @param Container $c
471 *
472 * @return AmeliaBooking\Application\Services\CustomField\AbstractCustomFieldApplicationService
473 */
474 $entries['application.customField.service'] = function ($c) {
475 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getCustomFieldService($c);
476 };
477
478 /**
479 * Web Hook Service
480 *
481 * @param Container $c
482 *
483 * @return AmeliaBooking\Application\Services\WebHook\AbstractWebHookApplicationService
484 */
485 $entries['application.webHook.service'] = function ($c) {
486 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getWebHookService($c);
487 };
488
489 /**
490 * Zoom Service
491 *
492 * @param Container $c
493 *
494 * @return AmeliaBooking\Application\Services\Zoom\AbstractZoomApplicationService
495 */
496 $entries['application.zoom.service'] = function ($c) {
497 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getZoomService($c);
498 };
499
500 /**
501 * ICS File Service
502 *
503 * @param Container $c
504 *
505 * @return \AmeliaBooking\Application\Services\Booking\IcsApplicationService
506 */
507 $entries['application.ics.service'] = function ($c) {
508 return new AmeliaBooking\Application\Services\Booking\IcsApplicationService($c);
509 };
510
511 /**
512 * Stash Service
513 *
514 * @param Container $c
515 *
516 * @return AmeliaBooking\Application\Services\Stash\StashApplicationService
517 */
518 $entries['application.stash.service'] = function ($c) {
519 return new AmeliaBooking\Application\Services\Stash\StashApplicationService($c);
520 };
521