Managed_DataObject now has listGet for all classes

This commit is contained in:
Mikael Nordfeldth
2013-08-18 21:02:33 +02:00
parent 923f16abe5
commit 97ce71e55d
6 changed files with 34 additions and 16 deletions

View File

@@ -61,6 +61,24 @@ abstract class Managed_DataObject extends Memcached_DataObject
return parent::pkeyGetClass(get_called_class(), $kv);
}
/**
* Get a multi-instance object
*
* This is a utility method to get multiple instances with a given set of
* values for a specific key column. Usually used for the primary key when
* multiple values are desired.
*
* @param array $keyCol key column name
* @param array $keyVals array of key values
*
* @return get_called_class() object with multiple instances if found, or null for no hits
*
*/
static function listGet($keyCol, $keyVals)
{
return parent::listGetClass(get_called_class(), $keyCol, $keyVals);
}
/**
* get/set an associative array of table columns
*