/** * Handle a command. * * @param $command * @return mixed */ public function handle($command) { $comment = $this->repository->leaveComment($command->user_id, $command->status_id, $command->body); }
/** * Handle the command. * * @param object $command * @return void */ public function handle($command) { $comment = $this->statusRepo->leaveComment($command->user_id, $command->status_id, $command->body); return $comment; }
/** * Handle the process of leaving a comment for a status. * * @param object $command * @return void */ public function handle($command) { $comment = $this->statusRepo->leaveComment($command->user_id, $command->status_id, $command->body); // Viewer: anything else you want to do here? Dispatch events, etc. return $comment; }