]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
staticGet is a static function
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 12 Aug 2013 17:08:11 +0000 (19:08 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 12 Aug 2013 17:08:11 +0000 (19:08 +0200)
We always call staticGet statically, so we define it statically. Next
step is to remove a bunch of definitions of 'staticGet' from classes
that can instead fall back to a parent class in Managed_DataObject.

The ampersand is removed as we're returning a class anyway, which does
not need a reference (and when we return false, it means nothing).

classes/Memcached_DataObject.php

index 54c885e737e83454a4488ab573f44883e7d8eb18..16ef7e4516baebad170456e04c499b1495b98207 100644 (file)
@@ -30,7 +30,7 @@ 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
      */
-    function &staticGet($cls, $k, $v=null)
+    static function staticGet($cls, $k, $v=null)
     {
         if (is_null($v)) {
             $v = $k;