Some HipHop fixes:
[lhc/web/wiklou.git] / includes / Init.php
index 4c84b9a..7f1449f 100644 (file)
@@ -90,4 +90,13 @@ class MWInit {
                }
                return $r !== false;
        }
+
+       /**
+        * Call a static method of a class with variable arguments without causing 
+        * it to become volatile.
+        */
+       static function callStaticMethod( $className, $methodName, $args ) {
+               $r = new ReflectionMethod( $className, $methodName );
+               return $r->invokeArgs( null, $args );
+       }
 }