Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace MediaWiki\Hook;
4
5use File;
6
7/**
8 * This is a hook handler interface, see docs/Hooks.md.
9 * Use the hook name "FileUpload" to register handlers implementing this interface.
10 *
11 * @stable to implement
12 * @ingroup Hooks
13 */
14interface FileUploadHook {
15    /**
16     * This hook is called when a file upload occurs.
17     *
18     * @since 1.35
19     *
20     * @param File $file Image object representing the file that was uploaded
21     * @param bool $reupload Boolean indicating if there was a previously another image there or
22     *   not (since 1.17)
23     * @param bool $hasDescription Boolean indicating that there was already a description page
24     *   and a new one from the comment wasn't created (since 1.17)
25     * @return bool|void True or no return value to continue or false to abort
26     */
27    public function onFileUpload( $file, $reupload, $hasDescription );
28}