MediaWiki
1.23.0
|
Class for managing the deferred updates. More...
Static Public Member Functions | |
static | addCallableUpdate ( $callable) |
Add a callable update. More... | |
static | addHTMLCacheUpdate ( $title, $table) |
HTMLCacheUpdates are the most common deferred update people use. More... | |
static | addUpdate (DeferrableUpdate $update) |
Add an update to the deferred list. More... | |
static | clearPendingUpdates () |
Clear all pending updates without performing them. More... | |
static | doUpdates ( $commit='') |
Do any deferred updates and clear the list. More... | |
Static Private Attributes | |
static | $updates = array() |
Store of updates to be deferred until the end of the request. More... | |
Class for managing the deferred updates.
Definition at line 41 of file DeferredUpdates.php.
|
static |
Add a callable update.
In a lot of cases, we just need a callback/closure, defining a new DeferrableUpdate object is not necessary
callable | $callable |
Definition at line 72 of file DeferredUpdates.php.
References addUpdate().
|
static |
HTMLCacheUpdates are the most common deferred update people use.
This is a shortcut method for that.
Title | $title | |
string | $table |
Definition at line 62 of file DeferredUpdates.php.
References $title, and addUpdate().
Referenced by WikiPage\onArticleEdit().
|
static |
Add an update to the deferred list.
DeferrableUpdate | $update | Some object that implements doUpdate() |
Definition at line 51 of file DeferredUpdates.php.
Referenced by addCallableUpdate(), addHTMLCacheUpdate(), LocalFile\delete(), WikiPage\doDeleteUpdates(), WikiPage\doEditUpdates(), WikiPage\doViewUpdates(), LocalFileRestoreBatch\execute(), LoginForm\initUser(), and LocalFile\recordUpload2().
|
static |
Clear all pending updates without performing them.
Generally, you don't want or need to call this. Unit tests need it though.
Definition at line 128 of file DeferredUpdates.php.
References $wgDeferredUpdateList, array(), and global.
Referenced by doUpdates(), and UploadFromUrlTestSuite\setUp().
|
static |
Do any deferred updates and clear the list.
string | $commit | set to 'commit' to commit after every update to prevent lock contention |
Definition at line 82 of file DeferredUpdates.php.
References $e, $updates, $wgDeferredUpdateList, as, clearPendingUpdates(), DB_MASTER, global, MWExceptionHandler\logException(), wfGetDB(), wfProfileIn(), and wfProfileOut().
Referenced by WikiPage\doEditContent(), MediaWiki\restInPeace(), and BackupReader\showReport().
|
staticprivate |
Store of updates to be deferred until the end of the request.
Definition at line 45 of file DeferredUpdates.php.
Referenced by doUpdates().