コード例 #1
0
ファイル: CommentFacade.php プロジェクト: jaromir92/Sportwin
 private function toCollection(DbEntries $comments)
 {
     return CommentCollection::loadFromDb($comments);
 }
コード例 #2
0
ファイル: ArticleService.php プロジェクト: jaromir92/Sportwin
 private static function loadCommentsFromDb(DbEntry $article)
 {
     $comments = new CommentCollection();
     foreach ($article->related("comment", "article_id") as $comment) {
         $comments->addItem(CommentService::loadFromDb($comment));
     }
     return $comments;
 }