Beispiel #1
0
 public static function loadAll()
 {
     $dbWrapper = new PDOWrapper();
     $connection = $dbWrapper->getConnection();
     $query = "SELECT * FROM forum";
     $forums = array();
     foreach ($connection->query($query) as $row) {
         $forum = new Forum($row['id'], $row['theme'], $row['date'], $row['commentCount'], $connection);
         $forum->setComments();
         $forums[] = $forum;
     }
     return $forums;
 }
Beispiel #2
0
 public function loadAll()
 {
     $this->forumArray = Forum::loadAll();
 }