コード例 #1
0
 /**
  * Load the next batch of slots
  * 
  * @return void
  * @access private
  * @since 12/4/07
  */
 private function loadNextBatch()
 {
     $query = new SelectQuery();
     $query->addColumn('shortname');
     $query->addTable('segue_slot');
     $query->startFromRow($this->startingNumber + 1);
     $query->limitNumberOfRows(50);
     $query->addOrderBy('shortname');
     // 		printpre($query->asString());
     $dbc = Services::getService('DBHandler');
     $result = $dbc->query($query, IMPORTER_CONNECTION);
     $slotNames = array();
     while ($result->hasNext()) {
         $slotNames[] = $result->field('shortname');
         $result->next();
         $this->startingNumber++;
     }
     // 		printpre($slotNames);
     $slotMgr = SlotManager::instance();
     $slots = $slotMgr->loadSlotsFromDb($slotNames);
     foreach ($slots as $slot) {
         $this->queue[] = $slot;
     }
 }