/** * @param Command $command * @throws \Exception */ public function addCommand(Command $command) { $this->commands[$command->getName()] = $command; $command->setLoop($this->getLoop()); $command->startProcess(); }