X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fdb%2FIDatabase.php;h=c024632edfbc7b4066b37f87926b41525f277d49;hb=144245268ddce82b3734281fd1a3fbc09793209e;hp=36772b804836ce10980ca23d694e4d6b4a40b25e;hpb=3eebaaffcf25c3779725309570de924ad5bea766;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/db/IDatabase.php b/includes/db/IDatabase.php index 36772b8048..c024632edf 100644 --- a/includes/db/IDatabase.php +++ b/includes/db/IDatabase.php @@ -33,6 +33,11 @@ * @ingroup Database */ interface IDatabase { + /* Constants to onTransactionResolution() callbacks */ + const TRIGGER_IDLE = 1; + const TRIGGER_COMMIT = 2; + const TRIGGER_ROLLBACK = 3; + /** * A string describing the current software version, and possibly * other details in a user-friendly way. Will be listed on Special:Version, etc. @@ -1223,6 +1228,9 @@ interface IDatabase { * * This is useful for combining cooperative locks and DB transactions. * + * The callback takes one argument: + * How the transaction ended (IDatabase::TRIGGER_COMMIT or IDatabase::TRIGGER_ROLLBACK) + * * @param callable $callback * @return mixed * @since 1.28 @@ -1242,6 +1250,9 @@ interface IDatabase { * * Updates will execute in the order they were enqueued. * + * The callback takes one argument: + * How the transaction ended (IDatabase::TRIGGER_COMMIT or IDatabase::TRIGGER_IDLE) + * * @param callable $callback * @since 1.20 */