]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/QnA/classes/QnA_Question.php
The overloaded DB_DataObject function staticGet is now called getKV
[quix0rs-gnu-social.git] / plugins / QnA / classes / QnA_Question.php
index 820656870b8fe782d2253e99e2615122969ae984..58a9cd5e183fd24fc25523f6ba002c7dfd94d794 100644 (file)
@@ -55,22 +55,6 @@ class QnA_Question extends Managed_DataObject
     public $closed;      // int (boolean) whether a question is closed
     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 QnA_Question object found, or null for no hits
-     *
-     */
-    function staticGet($k, $v=null)
-    {
-        return Memcached_DataObject::staticGet('QnA_Question', $k, $v);
-    }
-
     /**
      * Get an instance by compound key
      *
@@ -130,14 +114,14 @@ class QnA_Question extends Managed_DataObject
      *
      * @return Question found question or null
      */
-    function getByNotice($notice)
+    static function getByNotice($notice)
     {
-        return self::staticGet('uri', $notice->uri);
+        return self::getKV('uri', $notice->uri);
     }
 
     function getNotice()
     {
-        return Notice::staticGet('uri', $this->uri);
+        return Notice::getKV('uri', $this->uri);
     }
 
     function bestUrl()
@@ -147,7 +131,7 @@ class QnA_Question extends Managed_DataObject
 
     function getProfile()
     {
-        $profile = Profile::staticGet('id', $this->profile_id);
+        $profile = Profile::getKV('id', $this->profile_id);
         if (empty($profile)) {
             // TRANS: Exception trown when getting a profile for a non-existing ID.
             // TRANS: %s is the provided profile ID.
@@ -199,7 +183,7 @@ class QnA_Question extends Managed_DataObject
 
     static function fromNotice($notice)
     {
-        return QnA_Question::staticGet('uri', $notice->uri);
+        return QnA_Question::getKV('uri', $notice->uri);
     }
 
     function asHTML()