public function doStatus()
	{
		assert($this->_dispatcher);
		assert($this->_container);

		$this->_clearStatProperties();
		$this->_dispatcher->dispatch(self::EVENT_INIT_SERVICE, OnInitService::create());

		try
		{
			$this->notify(self::STATE_FIRED);

			$modulesAndFiles = $this->_findModulesAndMigrationFiles();
			$migrations      = $this->_parseMigrationFiles($modulesAndFiles);

			$this->notify(self::STATE_FIND_MIGRATIONS);

			$actions         = $this->_askMigrationList($modulesAndFiles, $migrations);
			$actions         = $this->_sortMigrationsList($actions);

			$this->notify(self::STATE_MIGRATIONS_ASKED);
			$states = [self::STATE_MIGRATION_STORED, self::STATE_MIGRATION_ROLLBACK, self::STATE_MIGRATION_APPLY];

			foreach (array_combine($states, [$actions[2], $actions[0], $actions[1]]) as $state => $migrations)
			{
				foreach (array_keys($migrations) as $migrationName)
				{
					$this->_stateMigrationName = $migrationName;
					$this->notify($state);
				}
			}

			$this->notify(self::STATE_COMPLETE);
		}
		catch (Exception $exception)
		{
			$this->_printError($exception);
			$this->notify(self::STATE_COMPLETE);
		}
		finally
		{
			$this->_stateMigrationName = null;
			$this->_state = self::STATE_INITIALIZED;

			$this->_dispatcher->dispatch(self::EVENT_FREE_SERVICE, OnFreeService::create());
		}
	}
public function doStatus()
	{
		assert($this->_dispatcher);
		assert($this->_container);

		$this->_clearStatProperties();
		$this->_dispatcher->dispatch(self::EVENT_INIT_SERVICE, OnInitService::create());

		try
		{
			$this->notify(self::STATE_FIRED);

			$modulesAndFiles = $this->_findModulesAndMigrationFiles();
			$migrations      = $this->_parseMigrationFiles($modulesAndFiles);

			$this->notify(self::STATE_FIND_MIGRATIONS);

			$actions         = $this->_askMigrationList($modulesAndFiles, $migrations);
			$actions         = $this->_sortMigrationsList($actions);

			$this->notify(self::STATE_MIGRATIONS_ASKED);
			$states = [self::STATE_MIGRATION_STORED, self::STATE_MIGRATION_ROLLBACK, self::STATE_MIGRATION_APPLY];

			foreach (array_combine($states, [$actions[2], $actions[0], $actions[1]]) as $state => $migrations)
			{
				foreach (array_keys($migrations) as $migrationName)
				{
					$this->_stateMigrationName = $migrationName;
					$this->notify($state);
				}
			}

			$this->notify(self::STATE_COMPLETE);
		}
		catch (Exception $exception)
		{
			$this->_printError($exception);
			$this->notify(self::STATE_COMPLETE);
		}
		finally
		{
			$this->_stateMigrationName = null;
			$this->_state = self::STATE_INITIALIZED;

			$this->_dispatcher->dispatch(self::EVENT_FREE_SERVICE, OnFreeService::create());
		}
	}
public function doStatus ( ) { assert ( $ this -> _dispatcher ) ; assert ( $ this -> _container ) ; $ this -> _clearStatProperties ( ) ; $ this -> _dispatcher -> dispatch ( self :: EVENT_INIT_SERVICE , OnInitService :: create ( ) ) ; try { $ this -> notify ( self :: STATE_FIRED ) ; $ modulesAndFiles = $ this -> _findModulesAndMigrationFiles ( ) ; $ migrations = $ this -> _parseMigrationFiles ( $ modulesAndFiles ) ; $ this -> notify ( self :: STATE_FIND_MIGRATIONS ) ; $ actions = $ this -> _askMigrationList ( $ modulesAndFiles , $ migrations ) ; $ actions = $ this -> _sortMigrationsList ( $ actions ) ; $ this -> notify ( self :: STATE_MIGRATIONS_ASKED ) ; $ states = [ self :: STATE_MIGRATION_STORED , self :: STATE_MIGRATION_ROLLBACK , self :: STATE_MIGRATION_APPLY ] ; foreach ( array_combine ( $ states , [ $ actions [ 2 ] , $ actions [ 0 ] , $ actions [ 1 ] ] ) as $ state => $ migrations ) { foreach ( array_keys ( $ migrations ) as $ migrationName ) { $ this -> _stateMigrationName = $ migrationName ; $ this -> notify ( $ state ) ; } } $ this -> notify ( self :: STATE_COMPLETE ) ; } catch ( Exception $ exception ) { $ this -> _printError ( $ exception ) ; $ this -> notify ( self :: STATE_COMPLETE ) ; } finally { $ this -> _stateMigrationName = null ; $ this -> _state = self :: STATE_INITIALIZED ; $ this -> _dispatcher -> dispatch ( self :: EVENT_FREE_SERVICE , OnFreeService :: create ( ) ) ; } }
Execute status command.
Execute status command .