Example #1
0
 private function toCollection(DbEntries $comments)
 {
     return CommentCollection::loadFromDb($comments);
 }
Example #2
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;
 }