示例#1
0
 public function __construct($id_article)
 {
     $s_comments = CommentManager::get_comments_by_article($id_article);
     $this->size = count($s_comments);
     $t_size = $this->size;
     for ($i = 0; $i < $t_size; $i++) {
         $current_comment = $s_comments[$i];
         $id_article = $current_comment['id_article'];
         $pseudo = $current_comment['pseudo'];
         $content = $current_comment['content'];
         $this->comments[$i] = new Comment($id_article, $pseudo, $content);
     }
 }