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 MediaWiki\Linker\LinkTarget;
6
7/**
8 * This is a hook handler interface, see docs/Hooks.md.
9 * Use the hook name "ImgAuthModifyHeaders" to register handlers implementing this interface.
10 *
11 * @stable to implement
12 * @ingroup Hooks
13 */
14interface ImgAuthModifyHeadersHook {
15    /**
16     * This hook is called just before a file is streamed to a user via
17     * img_auth.php, allowing headers to be modified beforehand.
18     *
19     * @since 1.35
20     *
21     * @param LinkTarget $title
22     * @param string[] &$headers HTTP headers ( name => value, names are case insensitive ).
23     *   Two headers get special handling: If-Modified-Since (value must be
24     *   a valid HTTP date) and Range (must be of the form "bytes=(\d*-\d*)")
25     *   will be honored when streaming the file.
26     * @return bool|void True or no return value to continue or false to abort
27     */
28    public function onImgAuthModifyHeaders( $title, &$headers );
29}