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:
@@ -44,7 +44,7 @@ require_once INSTALLDIR . '/classes/Memcached_DataObject.php';
|
||||
*
|
||||
* @see DB_DataObject
|
||||
*/
|
||||
class Group_message extends Memcached_DataObject
|
||||
class Group_message extends Managed_DataObject
|
||||
{
|
||||
public $__table = 'group_message'; // table name
|
||||
public $id; // char(36) primary_key not_null
|
||||
@@ -56,21 +56,6 @@ class Group_message extends Memcached_DataObject
|
||||
public $url;
|
||||
public $created;
|
||||
|
||||
/**
|
||||
* 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 (usually 'user_id' for this class)
|
||||
* @param mixed $v Value to lookup
|
||||
*
|
||||
* @return Group_message object found, or null for no hits
|
||||
*/
|
||||
function staticGet($k, $v=null)
|
||||
{
|
||||
return Memcached_DataObject::staticGet('Group_message', $k, $v);
|
||||
}
|
||||
|
||||
/**
|
||||
* return table definition for DB_DataObject
|
||||
*
|
||||
|
@@ -44,28 +44,13 @@ require_once INSTALLDIR . '/classes/Memcached_DataObject.php';
|
||||
*
|
||||
* @see DB_DataObject
|
||||
*/
|
||||
class Group_message_profile extends Memcached_DataObject
|
||||
class Group_message_profile extends Managed_DataObject
|
||||
{
|
||||
public $__table = 'group_message_profile'; // table name
|
||||
public $to_profile; // int
|
||||
public $group_message_id; // char(36) primary_key not_null
|
||||
public $created;
|
||||
|
||||
/**
|
||||
* 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 (usually 'user_id' for this class)
|
||||
* @param mixed $v Value to lookup
|
||||
*
|
||||
* @return Group_message object found, or null for no hits
|
||||
*/
|
||||
function staticGet($k, $v=null)
|
||||
{
|
||||
return Memcached_DataObject::staticGet('Group_message_profile', $k, $v);
|
||||
}
|
||||
|
||||
/**
|
||||
* return table definition for DB_DataObject
|
||||
*
|
||||
|
@@ -44,7 +44,7 @@ if (!defined('STATUSNET')) {
|
||||
*
|
||||
* @see DB_DataObject
|
||||
*/
|
||||
class Group_privacy_settings extends Memcached_DataObject
|
||||
class Group_privacy_settings extends Managed_DataObject
|
||||
{
|
||||
public $__table = 'group_privacy_settings';
|
||||
/** ID of the group. */
|
||||
@@ -70,21 +70,6 @@ class Group_privacy_settings extends Memcached_DataObject
|
||||
const MEMBER = 2;
|
||||
const ADMIN = 4;
|
||||
|
||||
/**
|
||||
* 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 (usually 'user_id' for this class)
|
||||
* @param mixed $v Value to lookup
|
||||
*
|
||||
* @return User_greeting_count object found, or null for no hits
|
||||
*/
|
||||
function staticGet($k, $v=null)
|
||||
{
|
||||
return Memcached_DataObject::staticGet('Group_privacy_settings', $k, $v);
|
||||
}
|
||||
|
||||
/**
|
||||
* return table definition for DB_DataObject
|
||||
*
|
||||
|
Reference in New Issue
Block a user