/** * Creates an Comment object based on a DB row. * * @param array $row The DB row containing Comment data. * @return \MicroCMS\Domain\Comment */ protected function buildDomainObject($row) { // Find the associated article $reservationId = $row['NUM_RESA']; $reservation = $this->reservationDAO->find($reservationId); $comment = new Comment(); $comment->setId($row['COM_ID']); $comment->setUserId($row['USER_ID']); $comment->setContent($row['COM_CONTENT']); $comment->setReservation($row['NUM_RESA']); return $comment; }