src/Commanding/SequentialCommandBus.php
/**
	 * Sequentially execute commands
	 *
	 * If an exception occurs in any command it will be put on a stack
	 * of exceptions that is thrown only when all the commands are processed.
	 *
	 * @param Command $command
	 *
	 * @throws Exception
	 */
Sequentially execute commands
If an exception occurs in any command it will be put on a stack
of exceptions that is thrown only when all the commands are processed.

@param Command $command

@throws Exception
Sequentially execute commands If an exception occurs in any command it will be put on a stack of exceptions that is thrown only when all the commands are processed . @param Command $command @throws Exception
public function handle(Command $command)
	{
		$this->commandStack[] = $command;
		if ($this->executing) {
			return;
		}
		$first = true;
		while (count($this->commandStack)) {
			$command = array_shift($this->commandStack);
			$this->invokeHandler($command, $first);
			$first = false;
		}
	}
public function handle ( Command $ command ) { $ this -> commandStack [ ] = $ command ; if ( $ this -> executing ) { return ; } $ first = true ; while ( count ( $ this -> commandStack ) ) { $ command = array_shift ( $ this -> commandStack ) ; $ this -> invokeHandler ( $ command , $ first ) ; $ first = false ; } }
Sequentially execute commands
 If an exception occurs in any command it will be put on a stack
 of exceptions that is thrown only when all the commands are processed.
Sequentially execute commands If an exception occurs in any command it will be put on a stack of exceptions that is thrown only when all the commands are processed .