MediaWiki  master
MediaWiki\Hook\ImgAuthBeforeStreamHook Interface Reference

Stable to implement. More...

Inheritance diagram for MediaWiki\Hook\ImgAuthBeforeStreamHook:

Public Member Functions

 onImgAuthBeforeStream (&$title, &$path, &$name, &$result)
 This hook is called before a file is streamed to a user, but only when using img_auth.php. More...
 

Detailed Description

Stable to implement.

Definition at line 11 of file ImgAuthBeforeStreamHook.php.

Member Function Documentation

◆ onImgAuthBeforeStream()

MediaWiki\Hook\ImgAuthBeforeStreamHook::onImgAuthBeforeStream ( $title,
$path,
$name,
$result 
)

This hook is called before a file is streamed to a user, but only when using img_auth.php.

Since
1.35
Parameters
Title&$titleTitle object of the file as it would appear for the upload page
string&$pathOriginal file and path name when img_auth was invoked by the web server
string&$nameName only component of the file
array&$resultLocation to pass back results of the hook routine (only used if failed)
  • $result[0]=The index of the header message
  • $result[1]=The index of the body text message
  • $result[2 through n]=Parameters passed to body text message. Please note the header message cannot receive/use parameters.
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: