/** * @param CommandInterface $command * * @return AbstractAggregateRoot[] */ public function dispatch(CommandInterface $command) { $aggregateRoots = $this->commandBus->dispatch($command); $this->dispatchEvents($aggregateRoots); return $aggregateRoots; }