Ejemplo n.º 1
0
 /**
  * @param MarkItemDone $command
  */
 public function handleMarkItemDone(MarkItemDone $command)
 {
     /* @var $item ToDoItem */
     $item = $this->repository->findById($command->getIdentity());
     $item->markDone($command);
     $this->repository->store($item);
 }
Ejemplo n.º 2
0
 /**
  * @param ScenarioTest_DoThat $command
  */
 public function handleScenarioTest_DoThat(ScenarioTest_DoThat $command)
 {
     $aggregate = $this->repository->findById($command->getId());
     $aggregate->doThat($command);
     $this->repository->store($aggregate, $aggregate->getVersion());
 }