forked from GNUsocial/gnu-social
Updating all Memcached_DataObject extended classes to Managed_DataObject
In some brief tests, this causes no problems. In this state however, you would need to modify DB_DataObject to have a static declaration of staticget (and probably pkeyGet). The next commit will change the staticGet overload to a unique function name (like getKV for getKeyValue), which means we can properly call the function by PHP Strict Standards.
This commit is contained in:
@@ -53,29 +53,13 @@ require_once INSTALLDIR . '/classes/Memcached_DataObject.php';
|
||||
* @see DB_DataObject
|
||||
*/
|
||||
|
||||
class Notice_to_status extends Memcached_DataObject
|
||||
class Notice_to_status extends Managed_DataObject
|
||||
{
|
||||
public $__table = 'notice_to_status'; // table name
|
||||
public $notice_id; // int(4) primary_key not_null
|
||||
public $status_id; // int(4)
|
||||
public $created; // datetime
|
||||
|
||||
/**
|
||||
* Get an instance by key
|
||||
*
|
||||
* This is a utility method to get a single instance with a given key value.
|
||||
*
|
||||
* @param string $k Key to use to lookup
|
||||
* @param mixed $v Value to lookup
|
||||
*
|
||||
* @return Notice_to_status object found, or null for no hits
|
||||
*
|
||||
*/
|
||||
function staticGet($k, $v=null)
|
||||
{
|
||||
return Memcached_DataObject::staticGet('Notice_to_status', $k, $v);
|
||||
}
|
||||
|
||||
/**
|
||||
* return table definition for DB_DataObject
|
||||
*
|
||||
|
@@ -48,7 +48,7 @@ require_once INSTALLDIR . '/classes/Memcached_DataObject.php';
|
||||
*
|
||||
* @see DB_DataObject
|
||||
*/
|
||||
class Twitter_synch_status extends Memcached_DataObject
|
||||
class Twitter_synch_status extends Managed_DataObject
|
||||
{
|
||||
public $__table = 'twitter_synch_status'; // table name
|
||||
public $foreign_id; // int(4) primary_key not_null
|
||||
@@ -65,7 +65,7 @@ class Twitter_synch_status extends Memcached_DataObject
|
||||
*
|
||||
* @return Twitter_synch_status object found, or null for no hits
|
||||
*/
|
||||
function staticGet($k, $v=null)
|
||||
static function staticGet($k, $v=null)
|
||||
{
|
||||
throw new Exception("Use pkeyGet() for this class.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user