public function handle(DeleteAlbumCommand $command) { $album = $this->albumRepository->ofId($command->getAlbumId()); $this->albumRepository->remove($album); }
public function handle(ChangeNameCommand $command) { $album = $this->albumRepository->ofId($command->getId()); $album->changeTitleFor($command->getNewName()); }