public function makeFromRow($row) { $comment = new Comment(); return $comment->setCommentId($row['commentId'])->setAuthor($row['author'])->setText($row['text'])->setDate($row['date'])->setPost($row['belongs_to_post']); }