4 * Deferrable Update for closure/callback
6 class MWCallableUpdate
implements DeferrableUpdate
{
8 * @var closure/callabck
13 * @param callable $callback
15 public function __construct( $callback ) {
16 if ( !is_callable( $callback ) ) {
17 throw new MWException( 'Not a valid callback/closure!' );
19 $this->callback
= $callback;
25 public function doUpdate() {
26 call_user_func( $this->callback
);