Merge "Consistently follow conventions for documenting parameters"
[lhc/web/wiklou.git] / includes / DeferredUpdates.php
index 89c4df6..a321414 100644 (file)
@@ -63,6 +63,16 @@ class DeferredUpdates {
                self::addUpdate( new HTMLCacheUpdate( $title, $table ) );
        }
 
+       /**
+        * Add a callable update.  In a lot of cases, we just need a callback/closure,
+        * defining a new DeferrableUpdate object is not necessary
+        * @see MWCallableUpdate::__construct()
+        * @param callable $callable
+        */
+       public static function addCallableUpdate( $callable ) {
+               self::addUpdate( new MWCallableUpdate( $callable ) );
+       }
+
        /**
         * Do any deferred updates and clear the list
         *