yupe\components\Migrator::getNewMigrations PHP Метод

getNewMigrations() защищенный Метод

Check for new migrations for module
protected getNewMigrations ( string $module ) : mixed
$module string - required module
Результат mixed new migrations
    protected function getNewMigrations($module)
    {
        $applied = [];
        foreach ($this->getMigrationHistory($module, -1) as $version => $time) {
            if ($time) {
                $applied[substr($version, 1, 13)] = true;
            }
        }
        $migrations = [];
        if (($migrationsPath = Yii::getPathOfAlias("application.modules." . $module . ".install.migrations")) && is_dir($migrationsPath)) {
            $handle = opendir($migrationsPath);
            while (($file = readdir($handle)) !== false) {
                if ($file === '.' || $file === '..') {
                    continue;
                }
                $path = $migrationsPath . '/' . $file;
                if (preg_match('/^(m(\\d{6}_\\d{6})_.*?)\\.php$/', $file, $matches) && is_file($path) && !isset($applied[$matches[2]])) {
                    $migrations[] = $matches[1];
                }
            }
            closedir($handle);
            sort($migrations);
        }
        return $migrations;
    }