protected function show(ICommand $command) { $this->loader->load($command->post); $this->content->make($command->post); $this->response->make($command->post); $this->dispatcher->dispatch($command->post->releaseEvents()); }
protected function save(ICommand $command) { $user = new User(); $user->username = $command->username; $user->email = $command->email; $user->password = $this->hashingService->hash($command->password); $user->confirmation_code = str_random(32); $this->repository->save($user); $this->dispatcher->dispatch($user->releaseEvents()); }