List of migration class at all entire path
@return array
765486
protected function getMigrationFiles()
    {
        if ($this->_migrationFiles === null) {
            $this->_migrationFiles = [];
            $directories = $this->getDirectories();

            foreach ($directories as $namespace => $dir) {
                if ($dir && is_dir($dir)) {
                    $handle = opendir($dir);
                    while (($file = readdir($handle)) !== false) {
                        if ($file === '.' || $file === '..') {
                            continue;
                        }
                        $path = $dir . DIRECTORY_SEPARATOR . $file;
                        if (preg_match('/^(m(\d{6}_?\d{6})\D.*?)\.php$/is', $file, $matches) && is_file($path)) {
                            $class = (is_int($namespace) ? '' : $namespace . '\\') . $matches[1];
                            if ($this->baseMigrationClass) {
                                try {
                                    require_once $path;
                                    if (is_subclass_of($class, $this->baseMigrationClass)) {
                                        $this->_migrationFiles[$class] = $path;
                                    }
                                } catch (\Exception $exc) {
                                    echo $exc->getMessage();
                                }
                            } else {
                                $this->_migrationFiles[$class] = $path;
                            }
                        }
                    }
                    closedir($handle);
                }
            }
        }

        return $this->_migrationFiles;
    }
1062406
protected function getNewMigrations()
    {
        $applied = [];
        foreach ($this->getMigrationHistory(-1) as $version => $time) {
            $applied[$version] = true;
        }

        $migrations = [];
        //var_dump(array_merge($this->migrationPaths, Yii::$app->migrationAliases));exit;
        foreach (array_merge($this->migrationPaths, Yii::$app->migrationAliases) as $migrationPathAlias) {
            $migrationPath = Yii::getAlias($migrationPathAlias);
            if (!is_dir($migrationPath)) {
                throw new Exception("Bad migration path {$migrationPath}!");
                continue;
            }
            $handle = opendir($migrationPath);
            while (($file = readdir($handle)) !== false) {
                if ($file === '.' || $file === '..') {
                    continue;
                }
                $path = $migrationPath . DIRECTORY_SEPARATOR . $file;
                if (preg_match('/^(m(\d{6}_\d{6})_.*?)\.php$/', $file, $matches) and is_file($path)) {
                    $migrationClassName = str_replace('/', '\\', substr($migrationPathAlias, 1)) . '\\' . $matches[1];
                    if (!isset($applied[$migrationClassName])) {
                        $key = $migrationClassName::baseClassName() . '-' . md5($migrationClassName);
                        $migrations[$key] = $migrationClassName;
                        $this->migrationsMap[$migrationClassName] = $path;
                    }
                }
            }
            closedir($handle);
        }
        ksort($migrations);

        return $migrations;
    }
1183882
protected function getMigrationPaths()
    {
        // Here, we will check to see if a path option has been defined. If it has we will
        // use the path relative to the root of the installation folder so our database
        // migrations may be run for any customized path from within the application.
        if ($this->input->hasOption('path') && $this->option('path')) {
            return collect($this->option('path'))->map(function ($path) {
                return ! $this->usingRealPath()
                                ? $this->laravel->basePath().'/'.$path
                                : $path;
            })->all();
        }

        return array_merge(
            $this->migrator->paths(), [$this->getMigrationPath()]
        );
    }
1199858
protected function getMigrationPaths()
    {
        // Here, we will check to see if a path option has been defined. If it has we will
        // use the path relative to the root of the installation folder so our database
        // migrations may be run for any customized path from within the application.
        if ($this->input->hasOption('path') && $this->option('path')) {
            return collect($this->option('path'))->map(function ($path) {
                return $this->laravel->basePath().'/'.$path;
            })->all();
        }

        return [$this->getMigrationPath()];
    }
1030302
protected function getMigrationPath()
    {
        // First, try the non-interactive option:
        $path = $this->getOption('path');

        if (!empty($path)) {
            return $path;
        }

        $paths = $this->getConfig()->getMigrationPaths();

        // No paths? That's a problem.
        if (empty($paths)) {
            throw new \InvalidArgumentException('No migration paths set in your migrate configuration file.');
        }

        $paths = Util::globAll($paths);

        if (empty($paths)) {
            throw new \InvalidArgumentException(
                'You probably used curly braces to define migration path in your migrate configuration file, ' .
                'but no directories have been matched using this pattern. ' .
                'You need to create a migration directory manually.'
            );
        }

        // Only one path set, so select that:
        if (1 === \count($paths)) {
            return \current($paths);
        }

        // Ask the user which of their defined paths they'd like to use:
        return $this->getPrompter()->choose('Which migrations path would you like to use?', $paths);
    }
1042264
public function inactiveMigrations()
    {
        $inactiveMigrations = [];
        $migration_arr = [];

        // Package Migrations
        $tables = $this->migrations_tables;

        // Application active migrations
        $migrations = DB::select('select * from '.DB::getTablePrefix().'migrations');

        foreach ($migrations as $migration_parent) { // Count active package migrations
            $migration_arr[] = $migration_parent->migration;
        }

        foreach ($tables as $table) {
            if (!in_array($table, $migration_arr)) {
                $inactiveMigrations[] = $table;
            }
        }

        return $inactiveMigrations;
    }
355321
protected function getLastMigration()
    {
        $lastMigrationTime = $this->getLastMigrationTime();
        if (empty($lastMigrationTime))
            return false;

        foreach (glob($this->getMigrationsPath() . DS . sprintf(self::CLASS_NAME_PATTERN, $lastMigrationTime, '*') . '.php') as $fileName) {
            $className = self::MIGRATIONS_NAMESPACE . '\\' . pathinfo($fileName, PATHINFO_FILENAME);
            $migration = new $className;
            break;
        }

        return $migration;
    }
660565
public function getRanMigrations()
    {
        $query = $this->resolveConnection($this->connection)->table($this->table);

        return $query->orderBy('batch', 'desc')->orderBy('migration', 'desc')->get();
    }
1098081
public function getAllMigrations()
    {
        $iterator = new \DirectoryIterator($this->configuration->getMigrationsDirectory());
        $migrations = [];

        foreach ($iterator as $file) {
            $fileName = (string) $file;

            if ($fileName === '.'|| $fileName === '..') {
                continue;
            }

            if (!is_dir($file->getPathname())) {
                // Ignore files that might be in the migrations directory, like documentation or
                // a .gitignore or .gitkeep file.
                continue;
            }

            $name = new Name($fileName);
            $isApplied = $this->isMigrationApplied($name);

            $migrations[] = new Migration($name, $isApplied);
        }

        usort($migrations, function (Migration $a, Migration $b) {
            return strcmp($a->getName(), $b->getName());
        });

        return $migrations;
    }
1281059
public function getAllClasses()
    {
        // Get all slugs that lead with a slash
        $pattern = '#(?:/([a-z-]+))#i';

        // If no matches, return an empty array.  Matches will be at first index;
        preg_match_all($pattern, $this->path, $matches);
        if (count($matches) <= 1) {
            return [];
        }
        $matches = $matches[1];

        // Remove actions from the matches list (like "edit")
        if (in_array($matches[count($matches) - 1], $this->actions)) {
            array_pop($matches);
        }

        // Convert all the matches to their classes
        return array_map(function ($name) {
            return $this->detectController($this->detectControllerClass($name));
        }, $matches);
    }
1250377
protected function getClassFiles()
    {
        $app = $this->laravel;

        $core = $app['config']->get('optimizer.core');

        $files = array_merge($core, $app['config']->get('compile.files', []));

        foreach ($app['config']->get('compile.providers', []) as $provider) {
            $files = array_merge($files, forward_static_call([$provider, 'compiles']));
        }

        return array_filter(array_map('realpath', $files));
    }
953902
public static function get_all() {
		$packages = [];
		$packages[] = 'project';
		foreach (\Skeleton\Core\Skeleton::get_all() as $package) {
			$packages[] = $package->name;
		}
		$migrations = [];
		foreach ($packages as $package) {
			$migrations[$package] = \Skeleton\Database\Migration::get_between_versions($package);
		}

		return $migrations;
	}
1246363
protected function getMigrationPath()
    {
        $path = $this->input->getOption('path');

        // First, we will check to see if a path option has been defined. If it has
        // we will use the path relative to the root of this installation folder
        // so that migrations may be run for any path within the applications.
        if(!is_null($path)){
            return $this->laravel['path.base'] . '/' . $path;
        }

        $package = $this->input->getOption('package');

        // If the package is in the list of migration paths we received we will put
        // the migrations in that path. Otherwise, we will assume the package is
        // is in the package directories and will place them in that location.
        if(!is_null($package)){
            return $this->packagePath . '/' . $package . '/src/migrations';
        }


        return $this->laravel['path.base'] . '/database/migrations';
    }
709451
private function getMigrationsFiles()
    {
        $migrationPath = $this->migrateManager->storagePath;
        $files = array();
        if ($handle = opendir($migrationPath)) {

            while (false !== ($entry = readdir($handle))) {

                if ($entry != "." && $entry != ".." && is_file($migrationPath . '/' . $entry)) {
                    $segments = explode('_', $entry);
                    $files[$segments[0]] = $entry;
                }
            }

            closedir($handle);

            return $files;
        }

        die (Utils::colorize("Error to open migrations storage", "FAILURE"));
    }
571900
public function getClassFiles()
    {
        foreach ($this->getFlattenedAutoloadConfiguration() as $configuration) {
            $normalizedAutoloadPath = $this->normalizeAutoloadPath($configuration['mappingType'], $configuration['namespace'], $configuration['classPath']);
            if (!is_dir($normalizedAutoloadPath)) {
                continue;
            }
            foreach ($this->getClassesInNormalizedAutoloadPath($normalizedAutoloadPath, $configuration['namespace']) as $className => $classPath) {
                yield $className => $classPath;
            }
        }
    }
1208452
public function getRanMigrations()
    {
        $migrations = [];

        $dbRes = $this->db->query("SELECT MIGRATION FROM {$this->table} ORDER BY ID ASC");
        while ($result = $dbRes->fetch()) {
            $migrations[] = $result['MIGRATION'];
        }

        return $migrations;
    }
81425
public function getAllClassNames()
    {
        if (!$this->paths) {
            throw MappingException::pathRequired();
        }
        $classes = [];
        $includedFiles = [];
        foreach ($this->paths as $path) {
            if (!is_dir($path)) {
                $this->logger->warning(sprintf(
                    'The given path "%s" seems to be incorrect. You need to edit victoire_core.base_paths configuration.',
                    $path
                ));
                continue;
            }
            $iterator = new \RegexIterator(
                new \RecursiveIteratorIterator(
                    new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS),
                    \RecursiveIteratorIterator::LEAVES_ONLY
                ),
                $this->regex,
                \RecursiveRegexIterator::GET_MATCH
            );
            foreach ($iterator as $file) {
                $sourceFile = realpath($file[0]);
                $includedFiles[] = $sourceFile;
            }
        }

        foreach ($includedFiles as $fileName) {
            $class = $this->getClassNameFromFile($fileName);
            if (class_exists($class) && !$this->isTransient($class)) {
                $classes[] = $class;
            }
        }

        return $classes;
    }