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:
Mikael Nordfeldth
2013-08-18 12:10:44 +02:00
parent c36608b233
commit e95f77d34c
41 changed files with 40 additions and 488 deletions

View File

@@ -35,12 +35,12 @@ if (!defined('STATUSNET')) {
* Common base class for the Yammer import mappings for users, groups, and notices.
*
* Child classes must override these static methods, since we need to run
* on PHP 5.2.x which has no late static binding:
* on PHP 5.2.x which has no late static binding: (not really anymore)
* - staticGet (as our other classes)
* - schemaDef (call self::doSchemaDef)
* - record (call self::doRecord)
*/
class Yammer_common extends Memcached_DataObject
class Yammer_common extends Managed_DataObject
{
public $__table = 'yammer_XXXX'; // table name
public $__field = 'XXXX_id'; // field name to save into
@@ -133,13 +133,13 @@ class Yammer_common extends Memcached_DataObject
*/
protected static function doRecord($class, $field, $orig_id, $local_id)
{
$map = parent::staticGet($class, 'id', $orig_id);
$map = Memcached_DataObject::staticGet($class, 'id', $orig_id);
if (!empty($map)) {
return $map;
}
$map = parent::staticGet($class, $field, $local_id);
$map = Memcached_DataObject::staticGet($class, $field, $local_id);
if (!empty($map)) {
return $map;