]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
pkeyGet is now static and more similar to getKV
authorMikael Nordfeldth <mmn@hethane.se>
Sun, 18 Aug 2013 13:42:51 +0000 (15:42 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Sun, 18 Aug 2013 13:42:51 +0000 (15:42 +0200)
Memcached_DataObject now defines
   * pkeyGetClass to avoid collision with Managed_DataObject pkeyGet
   * getClassKV to avoid collision with Managed_DataObject getKV

40 files changed:
classes/Avatar.php
classes/Config.php
classes/Fave.php
classes/File_to_post.php
classes/Group_block.php
classes/Group_inbox.php
classes/Group_join_queue.php
classes/Group_member.php
classes/Managed_DataObject.php
classes/Memcached_DataObject.php
classes/Notice_inbox.php
classes/Notice_tag.php
classes/Profile.php
classes/Profile_block.php
classes/Profile_list.php
classes/Profile_role.php
classes/Profile_tag.php
classes/Profile_tag_subscription.php
classes/Reply.php
classes/Status_network_tag.php
classes/Subscription.php
classes/Subscription_queue.php
classes/User_im_prefs.php
plugins/AnonymousFave/Fave_tally.php
plugins/Event/RSVP.php
plugins/ExtendedProfile/classes/Profile_detail.php
plugins/ModLog/ModLog.php
plugins/OpenID/User_openid_trustroot.php
plugins/Poll/Poll.php
plugins/Poll/Poll_response.php
plugins/QnA/classes/QnA_Answer.php
plugins/QnA/classes/QnA_Question.php
plugins/QnA/classes/QnA_Vote.php
plugins/Realtime/Realtime_channel.php
plugins/SearchSub/SearchSub.php
plugins/SubMirror/classes/SubMirror.php
plugins/TagSub/TagSub.php
plugins/TwitterBridge/Twitter_synch_status.php
plugins/UserFlag/User_flag_profile.php
plugins/YammerImport/classes/Yammer_common.php

index 6a5aaa3f8cd53cc2ad5d81d786b4fc2f3b37bd78..8cff14273c8abc66999a94539cb579845de86bb4 100644 (file)
@@ -64,11 +64,6 @@ class Avatar extends Managed_DataObject
         }
     }
 
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Avatar', $kv);
-    }
-
     /**
      * Where should the avatar go for this user?
      */
index 48dd6f38d483919322aea2a6fad171e12542ee1a..bf9d880caef6168009fb25c615aa3d9a39dfef8a 100644 (file)
@@ -133,11 +133,6 @@ class Config extends Managed_DataObject
         return $result;
     }
 
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Config', $kv);
-    }
-
     static function save($section, $setting, $value)
     {
         $result = null;
index 7eb3a89e5a8714bd3dfbba53673285b1f377b7a9..53d60b3a8202138ef58cf2cd6bbf6f8dbeb67444 100644 (file)
@@ -99,11 +99,6 @@ class Fave extends Managed_DataObject
         return $result;
     }
 
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Fave', $kv);
-    }
-
     function stream($user_id, $offset=0, $limit=NOTICES_PER_PAGE, $own=false, $since_id=0, $max_id=0)
     {
         $stream = new FaveNoticeStream($user_id, $own);
index 95ac660f47972b29091184e171f0b6896488d345..e53b1ebb4cfa38dc14b6a629ff7cd9f2487d1712 100644 (file)
@@ -84,11 +84,6 @@ class File_to_post extends Managed_DataObject
         }
     }
 
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('File_to_post', $kv);
-    }
-
     function delete()
     {
         $f = File::getKV('id', $this->file_id);
index a3a232c80de459ee32199bf5ad45ffc9c99ff751..8acd2546b959927ef07f270e873d59a13ca943f0 100644 (file)
@@ -55,11 +55,6 @@ class Group_block extends Managed_DataObject
         );
     }
 
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Group_block', $kv);
-    }
-
     static function isBlocked($group, $profile)
     {
         $block = Group_block::pkeyGet(array('group_id' => $group->id,
index a2f0879a6df04fa6f4adf7c09831cee47806f5b6..274f2b8f40fc1123770beab1e9503b76fd679e47 100644 (file)
@@ -37,9 +37,4 @@ class Group_inbox extends Managed_DataObject
             ),
         );
     }
-
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Group_inbox', $kv);
-    }
 }
index 55467d0dd861a9b0ad153ec275fb771ff972bcdc..8007552fcff4c6a4e8fcdf980efae29ef7acfa6d 100644 (file)
@@ -14,10 +14,6 @@ class Group_join_queue extends Managed_DataObject
     public $group_id;
     public $created;
 
-    /* Pkey get */
-    function pkeyGet($k)
-    { return Memcached_DataObject::pkeyGet('Group_join_queue',$k); }
-
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
 
index 1c37abab14bf265baf84dc8c081c21a28837c6a7..803f78883592881844142231e36b0e8067edb727 100644 (file)
@@ -48,11 +48,6 @@ class Group_member extends Managed_DataObject
         );
     }
 
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Group_member', $kv);
-    }
-
     /**
      * Method to add a user to a group.
      * In most cases, you should call Profile->joinGroup() instead.
index cc982cf63c18fda776e3893115eb59bfb5e3cab5..e473a2bf03d512685133d83a5fae776d7ef4f378 100644 (file)
@@ -41,9 +41,25 @@ abstract class Managed_DataObject extends Memcached_DataObject
      */
     static function getKV($k,$v=NULL)
     {
-        return parent::getKV(get_called_class(),$k,$v);
+        return parent::getClassKV(get_called_class(), $k, $v);
     }
 
+    /**
+     * Get an instance by compound key
+     *
+     * This is a utility method to get a single instance with a given set of
+     * key-value pairs. Usually used for the primary key for a compound key; thus
+     * the name.
+     *
+     * @param array $kv array of key-value mappings
+     *
+     * @return get_called_class() object if found, or null for no hits
+     *
+     */
+    static function pkeyGet($kv)
+    {
+        return parent::pkeyGetClass(get_called_class(), $kv);
+    }
 
     /**
      * get/set an associative array of table columns
index 8ff175db0d7b929a1021dc1e1e60861fe3cd0633..8460931fcce341ab981ab41913ad872b5f260f94 100644 (file)
@@ -30,14 +30,14 @@ class Memcached_DataObject extends Safe_DataObject
      * @param mixed $v key field value, or leave out for primary key lookup
      * @return mixed Memcached_DataObject subtype or false
      */
-    static function getKV($cls, $k, $v=null)
+    static function getClassKV($cls, $k, $v=null)
     {
         if (is_null($v)) {
             $v = $k;
             $keys = self::pkeyCols($cls);
             if (count($keys) > 1) {
-                // FIXME: maybe call pkeyGet() ourselves?
-                throw new Exception('Use pkeyGet() for compound primary keys');
+                // FIXME: maybe call pkeyGetClass() ourselves?
+                throw new Exception('Use pkeyGetClass() for compound primary keys');
             }
             $k = $keys[0];
         }
@@ -352,7 +352,7 @@ class Memcached_DataObject extends Safe_DataObject
     /**
      * @todo FIXME: Should this return false on lookup fail to match getKV?
      */
-    function pkeyGet($cls, $kv)
+    static function pkeyGetClass($cls, $kv)
     {
         $i = Memcached_DataObject::multicache($cls, $kv);
         if ($i !== false) { // false == cache miss
@@ -681,7 +681,9 @@ class Memcached_DataObject extends Safe_DataObject
                         'update',
                         'find');
         $ignoreStatic = array('getKV',
+                              'getClassKV',
                               'pkeyGet',
+                              'pkeyGetClass',
                               'cachedQuery');
         $here = get_class($this); // if we get confused
         $bt = debug_backtrace();
index 68bea196f2982981325d618fd3ce8c78e85c9c7b..2dc75959a41c20d2f57517605c4b6e425e44371c 100644 (file)
@@ -76,11 +76,6 @@ class Notice_inbox extends Managed_DataObject
         throw new Exception('Notice_inbox no longer used; use Inbox');
     }
 
-    function &pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Notice_inbox', $kv);
-    }
-
     static function gc($user_id)
     {
         throw new Exception('Notice_inbox no longer used; use Inbox');
index 663efe7b80122c181b42273f786c2faa452a426b..3d7658a1acfe19ed64e08f2c0d6ee152f43c2e4c 100644 (file)
@@ -68,11 +68,6 @@ class Notice_tag extends Managed_DataObject
         }
     }
 
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Notice_tag', $kv);
-    }
-
        static function url($tag)
        {
                if (common_config('singleuser', 'enabled')) {
index bee05981d2b705d3c1c94dd257f9a4cd84058a29..bd7976590f253dc6b84c237f109fb72bd6205ec4 100644 (file)
@@ -1242,9 +1242,8 @@ class Profile extends Managed_DataObject
     {
         // XXX: not really a pkey, but should work
 
-        $notice = Memcached_DataObject::pkeyGet('Notice',
-                                                array('profile_id' => $this->id,
-                                                      'repeat_of' => $notice_id));
+        $notice = Notice::pkeyGet(array('profile_id' => $this->id,
+                                        'repeat_of' => $notice_id));
 
         return !empty($notice);
     }
index b2708d564ce82a41cbb493ad6ceea5dba712cfb0..d9b5cbba87445944b6ee83052a7c11b1ef88fada 100644 (file)
@@ -56,8 +56,7 @@ class Profile_block extends Managed_DataObject
 
     function get($blocker, $blocked)
     {
-        return Memcached_DataObject::pkeyGet('Profile_block',
-                                             array('blocker' => $blocker,
-                                                   'blocked' => $blocked));
+        return Profile_block::pkeyGet(array('blocker' => $blocker,
+                                            'blocked' => $blocked));
      }
 }
index 749d98d5fcf1018dab84e2a69297128a17e168fb..0d6c6f284de9e7b9f477c9c0d260aa858d409ff8 100644 (file)
@@ -86,19 +86,6 @@ class Profile_list extends Managed_DataObject
         );
     }
 
-    /**
-     * return a profile_list record, given its tag and tagger.
-     *
-     * @param array $kv ideally array('tag' => $tag, 'tagger' => $tagger)
-     *
-     * @return Profile_list a Profile_list object with the given tag and tagger.
-     */
-
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Profile_list', $kv);
-    }
-
     /**
      * get the tagger of this profile_list object
      *
index c753d1aed4e563f4170c28cff32243746d5a4e20..2f6dff0e1b658d73509760f80c67661c9b4cbeb5 100644 (file)
@@ -56,11 +56,6 @@ class Profile_role extends Managed_DataObject
         );
     }
 
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Profile_role', $kv);
-    }
-
     const OWNER         = 'owner';
     const MODERATOR     = 'moderator';
     const ADMINISTRATOR = 'administrator';
index 4e0900aa63a2c21a9ee128970ec73aedeb7824da..39095aeddedeb07f47bbac8c419e0599e625fdb6 100644 (file)
@@ -42,10 +42,6 @@ class Profile_tag extends Managed_DataObject
         );
     }
 
-    function pkeyGet($kv) {
-        return Memcached_DataObject::pkeyGet('Profile_tag', $kv);
-    }
-
     function links()
     {
         return array('tagger,tag' => 'profile_list:tagger,tag');
index 28b37940a737a7ed7fba6bd90f3ca1c4ae8025a9..b088023fab74dabbd336f239cd87df41eb1c10d9 100644 (file)
@@ -41,11 +41,6 @@ class Profile_tag_subscription extends Managed_DataObject
         );
     }
 
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Profile_tag_subscription', $kv);
-    }
-
     static function add($peopletag, $profile)
     {
         if ($peopletag->private) {
index 1f3ed208d939bbd4f3880639880385280f4642bd..36686d0c76d6cb579edebba1af0eb72bca3b27d4 100644 (file)
@@ -40,11 +40,6 @@ class Reply extends Managed_DataObject
             ),
         );
     }    
-
-       function pkeyGet($kv)
-       {
-               return Memcached_DataObject::pkeyGet('Reply',$kv);   
-       }
        
     /**
      * Wrapper for record insertion to update related caches
index ba0e7d90f253f45ad79d83741bb9fe3cba8294c4..b7ea2cff3a3693ac1161c57f459386a43f8b3143 100644 (file)
@@ -60,9 +60,9 @@ class Status_network_tag extends Safe_DataObject
         return $i;
     }
 
-    function pkeyGet($kv)
+    static function pkeyGet($kv)
     {
-        return Memcached_DataObject::pkeyGet('Status_network_tag', $kv);
+        return Memcached_DataObject::pkeyGetClass('Status_network_tag', $kv);
     }
 
     /**
index 41d31f962fe5c565d2a8b915b172608864f6a220..1a4a714455cedc183a78b90e0d84ad904e22877d 100644 (file)
@@ -69,14 +69,6 @@ class Subscription extends Managed_DataObject
         );
     }
 
-    /* the code above is auto generated do not remove the tag below */
-    ###END_AUTOCODE
-
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Subscription', $kv);
-    }
-
     /**
      * Make a new subscription
      *
index 2711883539a5fe17c0f1daa48ff5f88e7ebfd8d4..ea0e906d43fca01c1208eeafc1508fc556d135ab 100644 (file)
@@ -14,10 +14,6 @@ class Subscription_queue extends Managed_DataObject
     public $subscribed;
     public $created;
 
-    /* Pkey get */
-    function pkeyGet($k)
-    { return Memcached_DataObject::pkeyGet('Subscription_queue',$k); }
-
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
 
index 027feff514a515c070d2327c7d146661f5d6ea8d..cba91ea252cc41a28ff27f42eccb4003af01ce50 100644 (file)
@@ -45,11 +45,6 @@ class User_im_prefs extends Managed_DataObject
     public $created;                         // datetime   not_null default_0000-00-00%2000%3A00%3A00
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
 
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('User_im_prefs', $kv);
-    }
-
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
 
index 5962e5ad87f474cb1e140bcdc0f3ba464145311b..eb23a7cb0ab150766e9f01086fb60e2bba25d6ec 100644 (file)
@@ -118,18 +118,6 @@ class Fave_tally extends Managed_DataObject
         return array(false, false, false);
     }
 
-    /**
-     * Get a single object with multiple keys
-     *
-     * @param array $kv Map of key-value pairs
-     *
-     * @return User_flag_profile found object or null
-     */
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Fave_tally', $kv);
-    }
-
     /**
      * Increment a notice's tally
      *
index 0a91106e68be89862fe673f2fab6cf580ef9faf0..cea916c23458bc06025eb0fc3291a9b27df1d95c 100644 (file)
@@ -56,19 +56,6 @@ class RSVP extends Managed_DataObject
     public $response;            // tinyint
     public $created;           // datetime
 
-    /**
-     * Get an instance by compound key
-     *
-     * @param array $kv array of key-value mappings
-     *
-     * @return Bookmark object found, or null for no hits
-     */
-
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('RSVP', $kv);
-    }
-
     /**
      * Add the compound profile_id/event_id index to our cache keys
      * since the DB_DataObject stuff doesn't understand compound keys
index 5335786ef9721b0108d79a93a93520d71df7ebda..01cf27c0d01284aff90f3f62aa60e1c6db7982b5 100644 (file)
@@ -69,23 +69,6 @@ class Profile_detail extends Managed_DataObject
     public $created;
     public $modified;
 
-    /**
-     * Get an instance by compound key
-     *
-     * This is a utility method to get a single instance with a given set of
-     * key-value pairs. Usually used for the primary key for a compound key; thus
-     * the name.
-     *
-     * @param array $kv array of key-value mappings
-     *
-     * @return Bookmark object found, or null for no hits
-     *
-     */
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Profile_detail', $kv);
-    }
-
     static function schemaDef()
     {
         return array(
index ff2588cfdbaac43dfb3515ef0d253c3557cc238a..606b786b29aee2696f5fb7b2c4b804d7ae3e5256 100644 (file)
@@ -55,19 +55,6 @@ class ModLog extends Managed_DataObject
     public $grant;        // 1 = grant, 0 = revoke
     public $created;      // datetime
 
-    /**
-     * Get an instance by compound key
-     *
-     * @param array $kv array of key-value mappings
-     *
-     * @return TagSub object found, or null for no hits
-     *
-     */
-    function pkeyGet($kv)
-    {
-        return Managed_DataObject::pkeyGet('ModLog', $kv);
-    }
-
     /**
      * The One True Thingy that must be defined and declared.
      */
index 7bfd4d90fda5e1bd8969eb79affbdeb6daef10ee..04d06c78f6e1e065ebf77419f69fe8535e208c8f 100644 (file)
@@ -21,11 +21,6 @@ class User_openid_trustroot extends Managed_DataObject
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
 
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('User_openid_trustroot', $kv);
-    }
-
     function table()
     {
         $db = $this->getDatabaseConnection();
index 6cc38f7435dd2ed148b221fc44fc97cc1fb04505..213bab492479f85bfae2dea18e733ab2371ebc3b 100644 (file)
@@ -53,23 +53,6 @@ class Poll extends Managed_DataObject
     public $options;     // text; newline(?)-delimited
     public $created;     // datetime
 
-    /**
-     * Get an instance by compound key
-     *
-     * This is a utility method to get a single instance with a given set of
-     * key-value pairs. Usually used for the primary key for a compound key; thus
-     * the name.
-     *
-     * @param array $kv array of key-value mappings
-     *
-     * @return Bookmark object found, or null for no hits
-     *
-     */
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Poll', $kv);
-    }
-
     /**
      * The One True Thingy that must be defined and declared.
      */
index ab1524c6916afdb270cfd038ce487b7ef7d30ca0..21b390db803febdfc8ebef6e506a7ba2ad71322c 100644 (file)
@@ -52,23 +52,6 @@ class Poll_response extends Managed_DataObject
     public $selection;   // int -> choice #
     public $created;     // datetime
 
-    /**
-     * Get an instance by compound key
-     *
-     * This is a utility method to get a single instance with a given set of
-     * key-value pairs. Usually used for the primary key for a compound key; thus
-     * the name.
-     *
-     * @param array $kv array of key-value mappings
-     *
-     * @return Bookmark object found, or null for no hits
-     *
-     */
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Poll_response', $kv);
-    }
-
     /**
      * The One True Thingy that must be defined and declared.
      */
index 96796b80e226094ddd963fce42d61ba1fe1c4be0..7f0ba82ac323acceae32667bf531b42e7afc1a34 100644 (file)
@@ -55,23 +55,6 @@ class QnA_Answer extends Managed_DataObject
     public $content;     // text -> response text
     public $created;     // datetime
 
-    /**
-     * Get an instance by compound key
-     *
-     * This is a utility method to get a single instance with a given set of
-     * key-value pairs. Usually used for the primary key for a compound key; thus
-     * the name.
-     *
-     * @param array $kv array of key-value mappings
-     *
-     * @return QA_Answer object found, or null for no hits
-     *
-     */
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('QnA_Answer', $kv);
-    }
-
     /**
      * The One True Thingy that must be defined and declared.
      */
index 58a9cd5e183fd24fc25523f6ba002c7dfd94d794..481f27cce4b8340cb88c06130b7f7f87225ac37a 100644 (file)
@@ -55,23 +55,6 @@ class QnA_Question extends Managed_DataObject
     public $closed;      // int (boolean) whether a question is closed
     public $created;     // datetime
 
-    /**
-     * Get an instance by compound key
-     *
-     * This is a utility method to get a single instance with a given set of
-     * key-value pairs. Usually used for the primary key for a compound key; thus
-     * the name.
-     *
-     * @param array $kv array of key-value mappings
-     *
-     * @return Bookmark object found, or null for no hits
-     *
-     */
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('QnA_Question', $kv);
-    }
-
     /**
      * The One True Thingy that must be defined and declared.
      */
index 025f6b0c6be558dcb31d31aca7f7959eb29efcd1..13679acd2c8c878aa3b6271108fbb12434e33f35 100644 (file)
@@ -55,23 +55,6 @@ class QnA_Vote extends Managed_DataObject
     public $profile_id;  // int -> question.id
     public $created;     // datetime
 
-    /**
-     * Get an instance by compound key
-     *
-     * This is a utility method to get a single instance with a given set of
-     * key-value pairs. Usually used for the primary key for a compound key; thus
-     * the name.
-     *
-     * @param array $kv array of key-value mappings
-     *
-     * @return QnA_Vote object found, or null for no hits
-     *
-     */
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('QnA_Vote', $kv);
-    }
-
     /**
      * The One True Thingy that must be defined and declared.
      */
index 3538e884a01d463245533cceb879be228a24e5db..ffd7d34f842edc6f7af157b38ffe12277e865553 100644 (file)
@@ -61,18 +61,6 @@ class Realtime_channel extends Managed_DataObject
     public $created;       // created date
     public $modified;      // modified date
 
-    /**
-     * Get an instance by compound key
-     *
-     * @param array $kv array of key-value mappings
-     *
-     * @return Realtime_channel object found, or null for no hits
-     */
-    function pkeyGet($kv)
-    {
-        return Managed_DataObject::pkeyGet('Realtime_channel', $kv);
-    }
-
     /**
      * The One True Thingy that must be defined and declared.
      */
index 246720b6a5790cf5d0083dfa197735240b6a4c8b..f3a44854b2730ed81870152772c5f73bea8cac32 100644 (file)
@@ -50,23 +50,6 @@ class SearchSub extends Managed_DataObject
     public $profile_id;  // int -> profile.id
     public $created;     // datetime
 
-    /**
-     * Get an instance by compound key
-     *
-     * This is a utility method to get a single instance with a given set of
-     * key-value pairs. Usually used for the primary key for a compound key; thus
-     * the name.
-     *
-     * @param array $kv array of key-value mappings
-     *
-     * @return SearchSub object found, or null for no hits
-     *
-     */
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('SearchSub', $kv);
-    }
-
     /**
      * The One True Thingy that must be defined and declared.
      */
index ac1eb01f60bd1d230afd38ada5171b19e01991fc..7e8d288b61331e69743eb90b571b5ca73ec637a9 100644 (file)
@@ -204,11 +204,6 @@ class SubMirror extends Managed_DataObject
         return $saved;
     }
 
-    public /*static*/ function pkeyGet($v)
-    {
-        return parent::pkeyGet(__CLASS__, $v);
-    }
-
     /**
      * Get the mirroring setting for a pair of profiles, if existing.
      *
index b91778654034e9eaee46965a23c00a994cda269b..5bc0c436ee8f7d3639d273896c98ae4436b81545 100644 (file)
@@ -49,23 +49,6 @@ class TagSub extends Managed_DataObject
     public $profile_id;  // int -> profile.id
     public $created;     // datetime
 
-    /**
-     * Get an instance by compound key
-     *
-     * This is a utility method to get a single instance with a given set of
-     * key-value pairs. Usually used for the primary key for a compound key; thus
-     * the name.
-     *
-     * @param array $kv array of key-value mappings
-     *
-     * @return TagSub object found, or null for no hits
-     *
-     */
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('TagSub', $kv);
-    }
-
     /**
      * The One True Thingy that must be defined and declared.
      */
index c9a0268575bb241d4e6cb1f875a566f1ff3c3ae5..6f5147cb6932e94cb6efa7015753bc74808cba6f 100644 (file)
@@ -57,32 +57,6 @@ class Twitter_synch_status extends Managed_DataObject
     public $created;                         // datetime not_null
     public $modified;                        // datetime not_null
 
-    /**
-     * Get an instance by key
-     *
-     * @param string $k Key to use to lookup (usually 'foreign_id' for this class)
-     * @param mixed  $v Value to lookup
-     *
-     * @return Twitter_synch_status object found, or null for no hits
-     */
-    static function staticGet($k, $v=null)
-    {
-        throw new Exception("Use pkeyGet() for this class.");
-    }
-
-    /**
-     * Get an instance by compound primary key
-     *
-     * @param array $kv key-value pair array
-     *
-     * @return Twitter_synch_status object found, or null for no hits
-     *
-     */
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('Twitter_synch_status', $kv);
-    }
-
     /**
      * return table definition for DB_DataObject
      *
index 02b7a7849f01e6727c9cbfceeb67506a31727dea..cd641fc53cc94185fc065e78b77ffc604b506db4 100644 (file)
@@ -108,18 +108,6 @@ class User_flag_profile extends Managed_DataObject
         return array(false, false, false);
     }
 
-    /**
-     * Get a single object with multiple keys
-     *
-     * @param array $kv Map of key-value pairs
-     *
-     * @return User_flag_profile found object or null
-     */
-    function pkeyGet($kv)
-    {
-        return Memcached_DataObject::pkeyGet('User_flag_profile', $kv);
-    }
-
     /**
      * Check if a flag exists for given profile and user
      *
index e794191d1b2e7bcece95e2f038eec94c7943726b..f063484ea95fefbb991876265ce2979e7b3053cd 100644 (file)
@@ -133,13 +133,13 @@ class Yammer_common extends Managed_DataObject
      */
     protected static function doRecord($class, $field, $orig_id, $local_id)
     {
-        $map = Memcached_DataObject::staticGet($class, 'id', $orig_id);
+        $map = Memcached_DataObject::getClassKV($class, 'id', $orig_id);
 
         if (!empty($map)) {
             return $map;
         }
 
-        $map = Memcached_DataObject::staticGet($class, $field, $local_id);
+        $map = Memcached_DataObject::getClassKV($class, $field, $local_id);
 
         if (!empty($map)) {
             return $map;