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