ApplicationService.php
1 year ago
DataModifier.php
2 years ago
DomainService.php
2 years ago
EventListener.php
1 year ago
InfrastructureService.php
2 years ago
Licence.php
1 year ago
InfrastructureService.php
133 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 Container $c |
| 38 | * |
| 39 | * @return InfrastructureServices\Recaptcha\AbstractRecaptchaService |
| 40 | */ |
| 41 | public static function getRecaptchaService($c) |
| 42 | { |
| 43 | return new InfrastructureServices\Recaptcha\LiteRecaptchaService( |
| 44 | $c->get('domain.settings.service') |
| 45 | ); |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * @param Container $c |
| 50 | * |
| 51 | * @return InfrastructureServices\LessonSpace\AbstractLessonSpaceService |
| 52 | */ |
| 53 | public static function getLessonSpaceService($c) |
| 54 | { |
| 55 | return new InfrastructureServices\LessonSpace\LiteLessonSpaceService( |
| 56 | $c, |
| 57 | $c->get('domain.settings.service') |
| 58 | ); |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * @param Container $c |
| 63 | * |
| 64 | * @return InfrastructureServices\Zoom\AbstractZoomService |
| 65 | */ |
| 66 | public static function getZoomService($c) |
| 67 | { |
| 68 | return new InfrastructureServices\Zoom\StarterZoomService( |
| 69 | $c->get('domain.settings.service') |
| 70 | ); |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * @param Container $c |
| 75 | * |
| 76 | * @return DomainServices\Payment\PaymentServiceInterface |
| 77 | */ |
| 78 | public static function getPayPalService($c) |
| 79 | { |
| 80 | return new InfrastructureServices\Payment\StarterPaymentService( |
| 81 | $c->get('domain.settings.service'), |
| 82 | new InfrastructureServices\Payment\CurrencyService( |
| 83 | $c->get('domain.settings.service') |
| 84 | ) |
| 85 | ); |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * @param Container $c |
| 90 | * |
| 91 | * @return DomainServices\Payment\PaymentServiceInterface |
| 92 | */ |
| 93 | public static function getStripeService($c) |
| 94 | { |
| 95 | return new InfrastructureServices\Payment\StarterPaymentService( |
| 96 | $c->get('domain.settings.service'), |
| 97 | new InfrastructureServices\Payment\CurrencyService( |
| 98 | $c->get('domain.settings.service') |
| 99 | ) |
| 100 | ); |
| 101 | } |
| 102 | |
| 103 | /** |
| 104 | * @param Container $c |
| 105 | * |
| 106 | * @return DomainServices\Payment\PaymentServiceInterface |
| 107 | */ |
| 108 | public static function getMollieService($c) |
| 109 | { |
| 110 | return new InfrastructureServices\Payment\StarterPaymentService( |
| 111 | $c->get('domain.settings.service'), |
| 112 | new InfrastructureServices\Payment\CurrencyService( |
| 113 | $c->get('domain.settings.service') |
| 114 | ) |
| 115 | ); |
| 116 | } |
| 117 | |
| 118 | /** |
| 119 | * @param Container $c |
| 120 | * |
| 121 | * @return DomainServices\Payment\PaymentServiceInterface |
| 122 | */ |
| 123 | public static function getRazorpayService($c) |
| 124 | { |
| 125 | return new InfrastructureServices\Payment\StarterPaymentService( |
| 126 | $c->get('domain.settings.service'), |
| 127 | new InfrastructureServices\Payment\CurrencyService( |
| 128 | $c->get('domain.settings.service') |
| 129 | ) |
| 130 | ); |
| 131 | } |
| 132 | } |
| 133 |