Localisation updates from https://translatewiki.net.
[mediawiki.git] / includes / content / Hook / GetDifferenceEngineHook.php
blobf3471fad07c26a5b7dc61eba912cd7948637af8c
1 <?php
3 namespace MediaWiki\Content\Hook;
5 use DifferenceEngine;
6 use MediaWiki\Context\IContextSource;
8 /**
9 * This is a hook handler interface, see docs/Hooks.md.
10 * Use the hook name "GetDifferenceEngine" to register handlers implementing this interface.
12 * @stable to implement
13 * @ingroup Hooks
15 interface GetDifferenceEngineHook {
16 /**
17 * This hook is called when getting a new difference engine interface object.
18 * Use this hook to decorate or replace the default difference engine.
20 * @since 1.35
22 * @param IContextSource $context IContextSource context to be used for diff
23 * @param int $old Revision ID to show and diff with
24 * @param int|string $new Either a revision ID or one of the strings 'cur', 'prev' or 'next'
25 * @param bool $refreshCache If set, refreshes the diff cache
26 * @param bool $unhide If set, allow viewing deleted revs
27 * @param DifferenceEngine &$differenceEngine Difference engine object to be used for the diff
28 * @return bool|void True or no return value to continue or false to abort
30 public function onGetDifferenceEngine( $context, $old, $new, $refreshCache,
31 $unhide, &$differenceEngine