protected function setNextState($current_state, $executed)
	{
		try
		{
			$next_state = $current_state->getNextState();
		}
		catch(ClassNotFoundException $e)
		{
			Session::put('Errors', new MessageBag( array("Class" => "Class not found") ) );
			return false;
		}

		if($executed)
		{
			// append next state
			$this->append($next_state);
		}
		else
		{
			// replace current state
			$this->replaceCurrent($next_state);
		}

		return true;
	}
protected function setNextState($current_state, $executed)
	{
		try
		{
			$next_state = $current_state->getNextState();
		}
		catch(ClassNotFoundException $e)
		{
			Session::put('Errors', new MessageBag( array("Class" => "Class not found") ) );
			return false;
		}

		if($executed)
		{
			// append next state
			$this->append($next_state);
		}
		else
		{
			// replace current state
			$this->replaceCurrent($next_state);
		}

		return true;
	}
protected function setNextState ( $ current_state , $ executed ) { try { $ next_state = $ current_state -> getNextState ( ) ; } catch ( ClassNotFoundException $ e ) { Session :: put ( 'Errors' , new MessageBag ( array ( "Class" => "Class not found" ) ) ) ; return false ; } if ( $ executed ) { // append next state $ this -> append ( $ next_state ) ; } else { // replace current state $ this -> replaceCurrent ( $ next_state ) ; } return true ; }
Set the next state

@return  Boolean $success
Set the next state