MediaWiki
1.23.2
|
Abstract base class for update jobs that do something with some secondary data extracted from article. More...
Public Member Functions | |
__construct () | |
Constructor. More... | |
beginTransaction () | |
Begin an appropriate transaction, if any. More... | |
commitTransaction () | |
Commit the transaction started via beginTransaction, if any. More... | |
rollbackTransaction () | |
Abort / roll back the transaction started via beginTransaction, if any. More... | |
Public Member Functions inherited from DeferrableUpdate | |
doUpdate () | |
Perform the actual work. More... | |
Static Public Member Functions | |
static | runUpdates ( $updates) |
Convenience method, calls doUpdate() on every DataUpdate in the array. More... | |
Abstract base class for update jobs that do something with some secondary data extracted from article.
Definition at line 32 of file DataUpdate.php.
DataUpdate::__construct | ( | ) |
Constructor.
Definition at line 36 of file DataUpdate.php.
DataUpdate::beginTransaction | ( | ) |
Begin an appropriate transaction, if any.
This default implementation does nothing.
Reimplemented in SqlDataUpdate.
Definition at line 44 of file DataUpdate.php.
DataUpdate::commitTransaction | ( | ) |
Commit the transaction started via beginTransaction, if any.
This default implementation does nothing.
Reimplemented in SqlDataUpdate.
Definition at line 52 of file DataUpdate.php.
DataUpdate::rollbackTransaction | ( | ) |
Abort / roll back the transaction started via beginTransaction, if any.
This default implementation does nothing.
Definition at line 60 of file DataUpdate.php.
|
static |
Convenience method, calls doUpdate() on every DataUpdate in the array.
This methods supports transactions logic by first calling beginTransaction() on all updates in the array, then calling doUpdate() on each, and, if all goes well, then calling commitTransaction() on each update. If an error occurs, rollbackTransaction() will be called on any update object that had beginTransaction() called but not yet commitTransaction().
This allows for limited transactional logic across multiple backends for storing secondary data.
array | $updates | a list of DataUpdate instances |
Exception|null |
Definition at line 79 of file DataUpdate.php.
References array(), as, and wfDebug().
Referenced by WikiPage\doDeleteUpdates(), WikiPage\doEditUpdates(), ApiPurge\execute(), RefreshLinks\fixLinksFromArticle(), and RefreshLinksJob\runForTitle().