AppMigration.php
2 years ago
AppMigrationTemplate.php
2 years ago
Cli.php
2 weeks ago
DbMigration.php
6 months ago
DbMigrationTemplate.php
2 years ago
Logger.php
2 years ago
Migrator.php
1 year ago
MigratorException.php
2 years ago
Repository.php
2 years ago
Runner.php
2 years ago
Store.php
6 months ago
index.php
3 years ago
AppMigration.php
27 lines
| 1 | <?php declare(strict_types = 1); |
| 2 | |
| 3 | namespace MailPoet\Migrator; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoet\DI\ContainerWrapper; |
| 9 | use MailPoetVendor\Doctrine\ORM\EntityManager; |
| 10 | |
| 11 | abstract class AppMigration { |
| 12 | /** @var ContainerWrapper */ |
| 13 | protected $container; |
| 14 | |
| 15 | /** @var EntityManager */ |
| 16 | protected $entityManager; |
| 17 | |
| 18 | public function __construct( |
| 19 | ContainerWrapper $container |
| 20 | ) { |
| 21 | $this->container = $container; |
| 22 | $this->entityManager = $container->get(EntityManager::class); |
| 23 | } |
| 24 | |
| 25 | abstract public function run(): void; |
| 26 | } |
| 27 |