Beispiel #1
0
 private static function loadCommentsFromDb(DbEntry $article)
 {
     $comments = new CommentCollection();
     foreach ($article->related("comment", "article_id") as $comment) {
         $comments->addItem(CommentService::loadFromDb($comment));
     }
     return $comments;
 }