ParamValidator: Flag as unstable for 1.34
[lhc/web/wiklou.git] / includes / deferred / MergeableUpdate.php
1 <?php
2
3 /**
4 * Interface that deferrable updates can implement to signal that updates can be combined.
5 *
6 * DeferredUpdates uses this to merge all pending updates of PHP class into a single update
7 * by calling merge(). Note that upon merge(), the combined update goes to the back of the FIFO
8 * queue so that such updates occur after related non-mergeable deferred updates. For example,
9 * suppose updates that purge URLs can be merged, and the calling pattern is:
10 * - a) DeferredUpdates::addUpdate( $purgeCdnUrlsA );
11 * - b) DeferredUpdates::addUpdate( $deleteContentUrlsB );
12 * - c) DeferredUpdates::addUpdate( $purgeCdnUrlsB )
13 *
14 * The purges for urls A and B will all happen after the $deleteContentUrlsB update.
15 *
16 * @since 1.27
17 */
18 interface MergeableUpdate extends DeferrableUpdate {
19 /**
20 * Merge this update with $update
21 *
22 * @param MergeableUpdate $update Update of the same class type
23 */
24 function merge( MergeableUpdate $update );
25 }