aboutsummaryrefslogtreecommitdiffstats
path: root/includes/media/Hook/BitmapHandlerTransformHook.php
blob: ffce271a04089b11285b6ec17b62831e5c714649 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php

namespace MediaWiki\Hook;

use MediaTransformOutput;
use MediaWiki\FileRepo\File\File;
use TransformationalImageHandler;

/**
 * This is a hook handler interface, see docs/Hooks.md.
 * Use the hook name "BitmapHandlerTransform" to register handlers implementing this interface.
 *
 * @stable to implement
 * @ingroup Hooks
 */
interface BitmapHandlerTransformHook {
	/**
	 * This hook is called before a file is transformed, giving extensions the
	 * possibility to transform it themselves.
	 *
	 * @since 1.35
	 *
	 * @param TransformationalImageHandler $handler
	 * @param File $image
	 * @param array &$scalerParams Array with scaler parameters
	 * @param null|MediaTransformOutput &$mto
	 * @return bool|void True or no return value to continue or false to abort
	 */
	public function onBitmapHandlerTransform( $handler, $image, &$scalerParams,
		&$mto
	);
}