Пример #1
0
 /**
  * Performs the actual fetching of the datastore items for the database, child classes may use this
  *
  * @param	string	title of the datastore item
  *
  * @return	bool	Valid Query?
  */
 protected function do_db_fetch($itemlist)
 {
     $this->db_assertor->hide_errors();
     $result = $this->db_assertor->assertQuery('datastore', array('title' => $itemlist));
     $this->db_assertor->show_errors();
     while ($result->valid()) {
         $dataitem = $result->current();
         $this->register($dataitem['title'], $dataitem['data'], isset($dataitem['unserialize']) ? $dataitem['unserialize'] : 2);
         //remove this value.
         $key = array_search($dataitem['title'], $itemlist);
         if ($key !== false) {
             unset($itemlist[$key]);
         }
         $result->next();
     }
     //Whatever is left we don't have in the database. No reason to query in the future;
     if (!empty($itemlist)) {
         foreach ($itemlist as $item) {
             $this->noValues[$item] = $item;
         }
     }
     return true;
 }