| @@ 15-50 (lines=36) @@ | ||
| 12 | /** |
|
| 13 | * The MigrationEventsArgs class is passed to events not related to a single migration version. |
|
| 14 | */ |
|
| 15 | final class MigrationsEventArgs extends EventArgs |
|
| 16 | { |
|
| 17 | /** @var Connection */ |
|
| 18 | private $connection; |
|
| 19 | ||
| 20 | /** @var MigrationPlanList */ |
|
| 21 | private $plan; |
|
| 22 | ||
| 23 | /** @var MigratorConfiguration */ |
|
| 24 | private $migratorConfiguration; |
|
| 25 | ||
| 26 | public function __construct( |
|
| 27 | Connection $connection, |
|
| 28 | MigrationPlanList $plan, |
|
| 29 | MigratorConfiguration $migratorConfiguration |
|
| 30 | ) { |
|
| 31 | $this->connection = $connection; |
|
| 32 | $this->plan = $plan; |
|
| 33 | $this->migratorConfiguration = $migratorConfiguration; |
|
| 34 | } |
|
| 35 | ||
| 36 | public function getConnection() : Connection |
|
| 37 | { |
|
| 38 | return $this->connection; |
|
| 39 | } |
|
| 40 | ||
| 41 | public function getPlan() : MigrationPlanList |
|
| 42 | { |
|
| 43 | return $this->plan; |
|
| 44 | } |
|
| 45 | ||
| 46 | public function getMigratorConfiguration() : MigratorConfiguration |
|
| 47 | { |
|
| 48 | return $this->migratorConfiguration; |
|
| 49 | } |
|
| 50 | } |
|
| 51 | ||
| @@ 15-50 (lines=36) @@ | ||
| 12 | /** |
|
| 13 | * The MigrationsVersionEventArgs class is passed to events related to a single migration version. |
|
| 14 | */ |
|
| 15 | final class MigrationsVersionEventArgs extends EventArgs |
|
| 16 | { |
|
| 17 | /** @var Connection */ |
|
| 18 | private $connection; |
|
| 19 | ||
| 20 | /** @var MigrationPlan */ |
|
| 21 | private $plan; |
|
| 22 | ||
| 23 | /** @var MigratorConfiguration */ |
|
| 24 | private $migratorConfiguration; |
|
| 25 | ||
| 26 | public function __construct( |
|
| 27 | Connection $connection, |
|
| 28 | MigrationPlan $plan, |
|
| 29 | MigratorConfiguration $migratorConfiguration |
|
| 30 | ) { |
|
| 31 | $this->connection = $connection; |
|
| 32 | $this->plan = $plan; |
|
| 33 | $this->migratorConfiguration = $migratorConfiguration; |
|
| 34 | } |
|
| 35 | ||
| 36 | public function getConnection() : Connection |
|
| 37 | { |
|
| 38 | return $this->connection; |
|
| 39 | } |
|
| 40 | ||
| 41 | public function getPlan() : MigrationPlan |
|
| 42 | { |
|
| 43 | return $this->plan; |
|
| 44 | } |
|
| 45 | ||
| 46 | public function getMigratorConfiguration() : MigratorConfiguration |
|
| 47 | { |
|
| 48 | return $this->migratorConfiguration; |
|
| 49 | } |
|
| 50 | } |
|
| 51 | ||