MediaWiki REL1_39
MediaWiki\Hook\ImgAuthModifyHeadersHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inheritance diagram for MediaWiki\Hook\ImgAuthModifyHeadersHook:

Public Member Functions

 onImgAuthModifyHeaders ( $title, &$headers)
 This hook is called just before a file is streamed to a user via img_auth.php, allowing headers to be modified beforehand.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "ImgAuthModifyHeaders" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 14 of file ImgAuthModifyHeadersHook.php.

Member Function Documentation

◆ onImgAuthModifyHeaders()

MediaWiki\Hook\ImgAuthModifyHeadersHook::onImgAuthModifyHeaders ( $title,
& $headers )

This hook is called just before a file is streamed to a user via img_auth.php, allowing headers to be modified beforehand.

Since
1.35
Parameters
LinkTarget$title
string[]&$headersHTTP headers ( name => value, names are case insensitive ). Two headers get special handling: If-Modified-Since (value must be a valid HTTP date) and Range (must be of the form "bytes=(\\d*-\\d*)") will be honored when streaming the file.
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: