return parent::pkeyGetClass(get_called_class(), $kv);
}
+ /**
+ * Get multiple items from the database by key
+ *
+ * @param string $keyCol name of column for key
+ * @param array $keyVals key values to fetch
+ * @param boolean $skipNulls return only non-null results?
+ *
+ * @return array Array of objects, in order
+ */
+ static function multiGet($keyCol, array $keyVals, $skipNulls=true)
+ {
+ return parent::multiGetClass(get_called_class(), $keyCol, $keyVals, $skipNulls);
+ }
+
/**
* Get multiple items from the database by key
*
*
* @return array Array of objects, in order
*/
- function multiGet($cls, $keyCol, array $keyVals, $skipNulls=true)
+ static function multiGetClass($cls, $keyCol, array $keyVals, $skipNulls=true)
{
$result = self::pivotGetClass($cls, $keyCol, $keyVals);
return $def;
}
-
- function multiGet($kc, $kvs, $skipNulls=true)
- {
- return Memcached_DataObject::multiGet('Notice', $kc, $kvs, $skipNulls);
- }
/* Notice types */
const LOCAL_PUBLIC = 1;
$ids[] = $f2p->file_id;
}
- $files = Memcached_DataObject::multiGet('File', 'id', $ids);
+ $files = File::multiGet('id', $ids);
$this->_attachments = $files->fetchAll();
return $def;
}
-
- function multiGet($keyCol, $keyVals, $skipNulls=true)
- {
- return parent::multiGet('Profile', $keyCol, $keyVals, $skipNulls);
- }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
public $join_policy; // tinyint
public $force_scope; // tinyint
- function multiGet($keyCol, $keyVals, $skipNulls=true)
- {
- return parent::multiGet('User_group', $keyCol, $keyVals, $skipNulls);
- }
-
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
foreach ($notices as $notice) {
$ids[] = $notice->id;
}
- Memcached_DataObject::multiGet('Spam_score', 'notice_id', $ids);
+ Spam_score::multiGet('notice_id', $ids);
}
return true;
}