MediaWiki master
|
DeferredUpdates helper class for managing DeferrableUpdate::doUpdate() nesting levels caused by nested calls to DeferredUpdates::doUpdates() More...
Public Member Functions | |
addUpdate (DeferrableUpdate $update, $stage) | |
Enqueue a deferred update within this scope using the specified "defer until" time. | |
clearPendingUpdates () | |
Cancel all pending updates within this scope. | |
getActiveUpdate () | |
Get the deferred update that owns this scope (root scope has none) | |
getPendingUpdates ( $stage) | |
Get pending updates within this scope with the given "defer until" stage. | |
pendingUpdatesCount () | |
Get the number of pending updates within this scope. | |
processUpdates ( $stage, callable $callback) | |
Iteratively, reassign unready pending updates to the parent scope (if applicable) and process the ready pending updates in stage-order with the callback, repeating the process until there is nothing left to do. | |
Static Public Member Functions | |
static | newChildScope ( $activeStage, DeferrableUpdate $update, DeferredUpdatesScope $parentScope) |
static | newRootScope () |
DeferredUpdates helper class for managing DeferrableUpdate::doUpdate() nesting levels caused by nested calls to DeferredUpdates::doUpdates()
Definition at line 32 of file DeferredUpdatesScope.php.
MediaWiki\Deferred\DeferredUpdatesScope::addUpdate | ( | DeferrableUpdate | $update, |
$stage ) |
Enqueue a deferred update within this scope using the specified "defer until" time.
DeferrableUpdate | $update | |
int | $stage | One of DeferredUpdates::STAGES |
Definition at line 94 of file DeferredUpdatesScope.php.
MediaWiki\Deferred\DeferredUpdatesScope::clearPendingUpdates | ( | ) |
Cancel all pending updates within this scope.
Definition at line 148 of file DeferredUpdatesScope.php.
MediaWiki\Deferred\DeferredUpdatesScope::getActiveUpdate | ( | ) |
Get the deferred update that owns this scope (root scope has none)
Definition at line 84 of file DeferredUpdatesScope.php.
MediaWiki\Deferred\DeferredUpdatesScope::getPendingUpdates | ( | $stage | ) |
Get pending updates within this scope with the given "defer until" stage.
int | $stage | One of DeferredUpdates::STAGES or DeferredUpdates::ALL |
Definition at line 134 of file DeferredUpdatesScope.php.
|
static |
int | $activeStage | The in-progress stage; one of DeferredUpdates::STAGES |
DeferrableUpdate | $update | The deferred update that owns this scope |
DeferredUpdatesScope | $parentScope | The parent scope of this scope |
Definition at line 71 of file DeferredUpdatesScope.php.
Referenced by MediaWiki\Deferred\DeferredUpdatesScopeStack\descend().
|
static |
Definition at line 61 of file DeferredUpdatesScope.php.
Referenced by MediaWiki\Deferred\DeferredUpdatesScopeStack\__construct().
MediaWiki\Deferred\DeferredUpdatesScope::pendingUpdatesCount | ( | ) |
Get the number of pending updates within this scope.
Definition at line 124 of file DeferredUpdatesScope.php.
MediaWiki\Deferred\DeferredUpdatesScope::processUpdates | ( | $stage, | |
callable | $callback ) |
Iteratively, reassign unready pending updates to the parent scope (if applicable) and process the ready pending updates in stage-order with the callback, repeating the process until there is nothing left to do.
int | $stage | One of DeferredUpdates::STAGES or DeferredUpdates::ALL |
callable | $callback | Processing function with arguments (update, effective stage) |
Definition at line 160 of file DeferredUpdatesScope.php.