MediaWiki master
MediaWiki\Hook\ImgAuthBeforeStreamHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

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.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 14 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: