public function collect(string
$name): MigrationCollection
{ if (!
isset($this->migrationSources
[$name])) { throw new UnknownMigrationSourceException($name);
} $source =
$this->migrationSources
[$name];
return new MigrationCollection($source,
$this->migrationRuntime,
$this->connection,
$this->logger
);
} public function collectAllForVersion(string
$version, string
$mode = self::VERSION_SELECTION_ALL
): MigrationCollection
{ $safeMajorVersion =
$this->
getLastSafeMajorVersion($version,
$mode);
$namespaces =
[];
for ($major = 3;
$safeMajorVersion >= 3 &&
$major <=
$safeMajorVersion; ++
$major) { $namespaces[] =
$this->
getSource('core.V6_' .
$major);
} $namespaces[] =
$this->
getSource('core'
);