/** * Load the banned users for the current room */ public function loadBannedUsers() { $roomBanCollection = new RoomBanCollection(); $sqlMarks = 'SELECT * FROM %s WHERE `idRoom` = %d'; $sql = static::sqlFormat($sqlMarks, $this->entity->getTableName(), $this->entity->idRoom); foreach (DB::query($sql)->fetchAll(\PDO::FETCH_ASSOC) as $row) { $roomBanCollection->add(new RoomBan($row)); } $this->entityCollection = $roomBanCollection; }