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