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