예제 #1
0
 public function bindAllTopic($forums)
 {
     if (!isset($forums)) {
         return null;
     }
     $topicDAO = TopicDAO::getInstance();
     foreach ($forums as $forum) {
         $topics = $topicDAO->getAllByForum($forum->getId());
         if (!$topics) {
             $topics = null;
         }
         $forum->setTopics($topics);
     }
 }