3 namespace MediaWiki\Content\Hook
;
6 use MediaWiki\Context\IContextSource
;
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
15 interface GetDifferenceEngineHook
{
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.
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