Plugins with classes that extend Managed_DataObject get better code reuse
The switch to having a function in Managed_DataObject is now being applied to plugins which can use this as well. There are some plugins that still use Memcached_DataObject, but these will be taken care of later.
This commit is contained in:
@@ -53,20 +53,6 @@ class Spam_score extends Managed_DataObject
|
||||
public $score; // float
|
||||
public $created; // datetime
|
||||
|
||||
/**
|
||||
* Get an instance by key
|
||||
*
|
||||
* @param string $k Key to use to lookup (usually 'notice_id' for this class)
|
||||
* @param mixed $v Value to lookup
|
||||
*
|
||||
* @return Spam_score object found, or null for no hits
|
||||
*
|
||||
*/
|
||||
function staticGet($k, $v=null)
|
||||
{
|
||||
return Managed_DataObject::staticGet('Spam_score', $k, $v);
|
||||
}
|
||||
|
||||
function saveNew($notice, $result) {
|
||||
|
||||
$score = new Spam_score();
|
||||
|
Reference in New Issue
Block a user