ApplicationService.php
1 year ago
DataModifier.php
1 year ago
DomainService.php
2 years ago
EventListener.php
1 year ago
InfrastructureService.php
1 year ago
Licence.php
1 year ago
InfrastructureService.php
142 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AmeliaBooking\Infrastructure\Licence\Lite; |
| 4 | |
| 5 | use AmeliaBooking\Domain\Services as DomainServices; |
| 6 | use AmeliaBooking\Infrastructure\Services as InfrastructureServices; |
| 7 | use AmeliaBooking\Infrastructure\Common\Container; |
| 8 | |
| 9 | /** |
| 10 | * Class InfrastructureService |
| 11 | * |
| 12 | * @package AmeliaBooking\Infrastructure\Licence\Lite |
| 13 | */ |
| 14 | class InfrastructureService |
| 15 | { |
| 16 | /** |
| 17 | * @param Container $c |
| 18 | * |
| 19 | * @return InfrastructureServices\Google\AbstractGoogleCalendarService |
| 20 | */ |
| 21 | public static function getCalendarGoogleService($c) |
| 22 | { |
| 23 | return new InfrastructureServices\Google\StarterGoogleCalendarService($c); |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * @param Container $c |
| 28 | * |
| 29 | * @return InfrastructureServices\Outlook\AbstractOutlookCalendarService |
| 30 | */ |
| 31 | public static function getCalendarOutlookService($c) |
| 32 | { |
| 33 | return new InfrastructureServices\Outlook\StarterOutlookCalendarService($c); |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | * @param $c |
| 38 | * @return InfrastructureServices\Apple\AbstractAppleCalendarService |
| 39 | */ |
| 40 | public static function getAppleCalendarService($c) |
| 41 | { |
| 42 | return new InfrastructureServices\Apple\StarterAppleCalendarCalendarService($c); |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * @param Container $c |
| 47 | * |
| 48 | * @return InfrastructureServices\Recaptcha\AbstractRecaptchaService |
| 49 | */ |
| 50 | public static function getRecaptchaService($c) |
| 51 | { |
| 52 | return new InfrastructureServices\Recaptcha\LiteRecaptchaService( |
| 53 | $c->get('domain.settings.service') |
| 54 | ); |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * @param Container $c |
| 59 | * |
| 60 | * @return InfrastructureServices\LessonSpace\AbstractLessonSpaceService |
| 61 | */ |
| 62 | public static function getLessonSpaceService($c) |
| 63 | { |
| 64 | return new InfrastructureServices\LessonSpace\LiteLessonSpaceService( |
| 65 | $c, |
| 66 | $c->get('domain.settings.service') |
| 67 | ); |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * @param Container $c |
| 72 | * |
| 73 | * @return InfrastructureServices\Zoom\AbstractZoomService |
| 74 | */ |
| 75 | public static function getZoomService($c) |
| 76 | { |
| 77 | return new InfrastructureServices\Zoom\StarterZoomService( |
| 78 | $c->get('domain.settings.service') |
| 79 | ); |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * @param Container $c |
| 84 | * |
| 85 | * @return DomainServices\Payment\PaymentServiceInterface |
| 86 | */ |
| 87 | public static function getPayPalService($c) |
| 88 | { |
| 89 | return new InfrastructureServices\Payment\StarterPaymentService( |
| 90 | $c->get('domain.settings.service'), |
| 91 | new InfrastructureServices\Payment\CurrencyService( |
| 92 | $c->get('domain.settings.service') |
| 93 | ) |
| 94 | ); |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * @param Container $c |
| 99 | * |
| 100 | * @return DomainServices\Payment\PaymentServiceInterface |
| 101 | */ |
| 102 | public static function getStripeService($c) |
| 103 | { |
| 104 | return new InfrastructureServices\Payment\StarterPaymentService( |
| 105 | $c->get('domain.settings.service'), |
| 106 | new InfrastructureServices\Payment\CurrencyService( |
| 107 | $c->get('domain.settings.service') |
| 108 | ) |
| 109 | ); |
| 110 | } |
| 111 | |
| 112 | /** |
| 113 | * @param Container $c |
| 114 | * |
| 115 | * @return DomainServices\Payment\PaymentServiceInterface |
| 116 | */ |
| 117 | public static function getMollieService($c) |
| 118 | { |
| 119 | return new InfrastructureServices\Payment\StarterPaymentService( |
| 120 | $c->get('domain.settings.service'), |
| 121 | new InfrastructureServices\Payment\CurrencyService( |
| 122 | $c->get('domain.settings.service') |
| 123 | ) |
| 124 | ); |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * @param Container $c |
| 129 | * |
| 130 | * @return DomainServices\Payment\PaymentServiceInterface |
| 131 | */ |
| 132 | public static function getRazorpayService($c) |
| 133 | { |
| 134 | return new InfrastructureServices\Payment\StarterPaymentService( |
| 135 | $c->get('domain.settings.service'), |
| 136 | new InfrastructureServices\Payment\CurrencyService( |
| 137 | $c->get('domain.settings.service') |
| 138 | ) |
| 139 | ); |
| 140 | } |
| 141 | } |
| 142 |