[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/deferred/ -> DataUpdate.php (summary)

Base code for update jobs that do something with some secondary data extracted from article. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

File Size: 125 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 5 functions

  __construct()
  beginTransaction()
  commitTransaction()
  rollbackTransaction()
  runUpdates()

Functions
Functions that are not part of a class:

__construct()   X-Ref
Constructor


beginTransaction()   X-Ref
Begin an appropriate transaction, if any.
This default implementation does nothing.


commitTransaction()   X-Ref
Commit the transaction started via beginTransaction, if any.
This default implementation does nothing.


rollbackTransaction()   X-Ref
Abort / roll back the transaction started via beginTransaction, if any.
This default implementation does nothing.


runUpdates( $updates )   X-Ref
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.

param: array $updates A list of DataUpdate instances



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1