MediaWiki master
MediaWiki\Output\Hook\BeforePageRedirectHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onBeforePageRedirect ( $out, &$redirect, &$code)
 This hook is called prior to sending an HTTP redirect.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 14 of file BeforePageRedirectHook.php.

Member Function Documentation

◆ onBeforePageRedirect()

MediaWiki\Output\Hook\BeforePageRedirectHook::onBeforePageRedirect ( $out,
& $redirect,
& $code )

This hook is called prior to sending an HTTP redirect.

Gives a chance to override how the redirect is output by modifying, or by returning false and taking over the output.

Since
1.35
Parameters
OutputPage$out
string&$redirectAbsolute or path-relative URL, modifiable
string&$codeHTTP code (eg '301' or '302'), modifiable
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: