Tables
2 years ago
GeneralMigration.php
2 years ago
MigrationsServiceProvider.php
2 years ago
Table.php
3 years ago
UpdateMigrationServiceProvider.php
3 years ago
UserMetaMigrationsService.php
3 years ago
WebhookMigrationsService.php
2 years ago
MigrationsServiceProvider.php
48 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SureCart\Database; |
| 4 | |
| 5 | use SureCart\Database\Tables\IncomingWebhook; |
| 6 | use SureCart\Database\Tables\Integrations; |
| 7 | use SureCartCore\ServiceProviders\ServiceProviderInterface; |
| 8 | |
| 9 | /** |
| 10 | * WordPress Users service. |
| 11 | */ |
| 12 | class MigrationsServiceProvider implements ServiceProviderInterface { |
| 13 | /** |
| 14 | * {@inheritDoc} |
| 15 | * |
| 16 | * @param \Pimple\Container $container Service Container. |
| 17 | */ |
| 18 | public function register( $container ) { |
| 19 | $container['surecart.tables.integrations'] = function () { |
| 20 | return new Integrations( new Table() ); |
| 21 | }; |
| 22 | |
| 23 | $container['surecart.tables.webhooks.incoming'] = function () { |
| 24 | return new IncomingWebhook( new Table() ); |
| 25 | }; |
| 26 | |
| 27 | $container['surecart.migrations.usermeta'] = function() { |
| 28 | return new UserMetaMigrationsService(); |
| 29 | }; |
| 30 | |
| 31 | $container['surecart.migrations.webhook'] = function() { |
| 32 | return new WebhookMigrationsService(); |
| 33 | }; |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | * {@inheritDoc} |
| 38 | * |
| 39 | * @param \Pimple\Container $container Service Container. |
| 40 | */ |
| 41 | public function bootstrap( $container ) { |
| 42 | $container['surecart.tables.integrations']->install(); |
| 43 | $container['surecart.tables.webhooks.incoming']->install(); |
| 44 | $container['surecart.migrations.usermeta']->bootstrap(); |
| 45 | $container['surecart.migrations.webhook']->bootstrap(); |
| 46 | } |
| 47 | } |
| 48 |