ApplicationService.php
1 year ago
DataModifier.php
1 year ago
DomainService.php
2 years ago
EventListener.php
1 year ago
InfrastructureService.php
11 months ago
Licence.php
11 months ago
InfrastructureService.php
161 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\Mailchimp\AbstractMailchimpService |
| 49 | */ |
| 50 | public static function getMailchimpService($c) |
| 51 | { |
| 52 | return new InfrastructureServices\Mailchimp\StarterMailchimpService($c); |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * @param Container $c |
| 57 | * |
| 58 | * @return InfrastructureServices\Recaptcha\AbstractRecaptchaService |
| 59 | */ |
| 60 | public static function getRecaptchaService($c) |
| 61 | { |
| 62 | return new InfrastructureServices\Recaptcha\LiteRecaptchaService( |
| 63 | $c->get('domain.settings.service') |
| 64 | ); |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * @param Container $c |
| 69 | * |
| 70 | * @return InfrastructureServices\LessonSpace\AbstractLessonSpaceService |
| 71 | */ |
| 72 | public static function getLessonSpaceService($c) |
| 73 | { |
| 74 | return new InfrastructureServices\LessonSpace\LiteLessonSpaceService( |
| 75 | $c, |
| 76 | $c->get('domain.settings.service') |
| 77 | ); |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * @param Container $c |
| 82 | * |
| 83 | * @return InfrastructureServices\Zoom\AbstractZoomService |
| 84 | */ |
| 85 | public static function getZoomService($c) |
| 86 | { |
| 87 | return new InfrastructureServices\Zoom\StarterZoomService( |
| 88 | $c->get('domain.settings.service') |
| 89 | ); |
| 90 | } |
| 91 | |
| 92 | /** |
| 93 | * @param Container $c |
| 94 | * |
| 95 | * @return DomainServices\Payment\PaymentServiceInterface |
| 96 | */ |
| 97 | public static function getPayPalService($c) |
| 98 | { |
| 99 | return new InfrastructureServices\Payment\StarterPaymentService( |
| 100 | $c->get('domain.settings.service'), |
| 101 | new InfrastructureServices\Payment\CurrencyService( |
| 102 | $c->get('domain.settings.service') |
| 103 | ) |
| 104 | ); |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * @param Container $c |
| 109 | * |
| 110 | * @return DomainServices\Payment\PaymentServiceInterface |
| 111 | */ |
| 112 | public static function getStripeService($c) |
| 113 | { |
| 114 | return new InfrastructureServices\Payment\StarterPaymentService( |
| 115 | $c->get('domain.settings.service'), |
| 116 | new InfrastructureServices\Payment\CurrencyService( |
| 117 | $c->get('domain.settings.service') |
| 118 | ) |
| 119 | ); |
| 120 | } |
| 121 | |
| 122 | /** |
| 123 | * @param Container $c |
| 124 | * |
| 125 | * @return DomainServices\Payment\PaymentServiceInterface |
| 126 | */ |
| 127 | public static function getMollieService($c) |
| 128 | { |
| 129 | return new InfrastructureServices\Payment\StarterPaymentService( |
| 130 | $c->get('domain.settings.service'), |
| 131 | new InfrastructureServices\Payment\CurrencyService( |
| 132 | $c->get('domain.settings.service') |
| 133 | ) |
| 134 | ); |
| 135 | } |
| 136 | |
| 137 | /** |
| 138 | * @param Container $c |
| 139 | * |
| 140 | * @return DomainServices\Payment\PaymentServiceInterface |
| 141 | */ |
| 142 | public static function getRazorpayService($c) |
| 143 | { |
| 144 | return new InfrastructureServices\Payment\StarterPaymentService( |
| 145 | $c->get('domain.settings.service'), |
| 146 | new InfrastructureServices\Payment\CurrencyService( |
| 147 | $c->get('domain.settings.service') |
| 148 | ) |
| 149 | ); |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * @param $c |
| 154 | * @return InfrastructureServices\Authentication\AbstractSocialAuthenticationService |
| 155 | */ |
| 156 | public static function getSocialAuthenticationService($c) |
| 157 | { |
| 158 | return new InfrastructureServices\Authentication\StarterSocialAuthenticationService($c); |
| 159 | } |
| 160 | } |
| 161 |