public function getStatus($packageKey, $versionNumber = null)
    {
        $status = array();
        $migrations = $this->getMigrations($versionNumber);
        foreach ($this->getPackagesData($packageKey) as &$this->currentPackageData) {
            $packageStatus = array();
            foreach ($migrations as $migration) {
                if ($this->hasMigrationApplied($migration)) {
                    $state = self::STATE_MIGRATED;
                } else {
                    $state = self::STATE_NOT_MIGRATED;
                }
                $packageStatus[$migration->getVersionNumber()] = array('migration' => $migration, 'state' => $state);
            }
            $status[$this->currentPackageData['packageKey']] = $packageStatus;
        }
        return $status;
    }
public function getStatus($packageKey, $versionNumber = null)
    {
        $status = array();
        $migrations = $this->getMigrations($versionNumber);
        foreach ($this->getPackagesData($packageKey) as &$this->currentPackageData) {
            $packageStatus = array();
            foreach ($migrations as $migration) {
                if ($this->hasMigrationApplied($migration)) {
                    $state = self::STATE_MIGRATED;
                } else {
                    $state = self::STATE_NOT_MIGRATED;
                }
                $packageStatus[$migration->getVersionNumber()] = array('migration' => $migration, 'state' => $state);
            }
            $status[$this->currentPackageData['packageKey']] = $packageStatus;
        }
        return $status;
    }
public function getStatus ( $ packageKey , $ versionNumber = null ) { $ status = array ( ) ; $ migrations = $ this -> getMigrations ( $ versionNumber ) ; foreach ( $ this -> getPackagesData ( $ packageKey ) as & $ this -> currentPackageData ) { $ packageStatus = array ( ) ; foreach ( $ migrations as $ migration ) { if ( $ this -> hasMigrationApplied ( $ migration ) ) { $ state = self :: STATE_MIGRATED ; } else { $ state = self :: STATE_NOT_MIGRATED ; } $ packageStatus [ $ migration -> getVersionNumber ( ) ] = array ( 'migration' => $ migration , 'state' => $ state ) ; } $ status [ $ this -> currentPackageData [ 'packageKey' ] ] = $ packageStatus ; } return $ status ; }
Returns the migration status for all packages.

@param string $packageKey key of the package to fetch the migration status for
@param string $versionNumber version of the migration to fetch the status for (e.g. "20120126163610"), or NULL to consider all migrations
@return array in the format [<versionNumber> => ['migration' => <AbstractMigration>, 'state' => <STATE_*>], [...]]
Returns the migration status for all packages .