MediaWiki master
MediaWiki\ResourceLoader\Hook\ResourceLoaderBeforeResponseHook Interface Reference

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

Inherited by MediaWiki\ResourceLoader\HookRunner.

Public Member Functions

 onResourceLoaderBeforeResponse (Context $context, array &$extraHeaders)
 Add extra HTTP response headers for the given request context.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 14 of file ResourceLoaderBeforeResponseHook.php.

Member Function Documentation

◆ onResourceLoaderBeforeResponse()

MediaWiki\ResourceLoader\Hook\ResourceLoaderBeforeResponseHook::onResourceLoaderBeforeResponse ( Context $context,
array & $extraHeaders )

Add extra HTTP response headers for the given request context.

These headers are sent regardless of status (200 OK, or 304 Not Modified) and content type (CSS, JS, Image, SourceMap).

This hook is called from ResourceLoaderEntryPoint.

Since
1.45
Parameters
Context$context
string[]&$extraHeaders
Returns
void This hook must not abort, it must return no value

Implemented in MediaWiki\ResourceLoader\HookRunner.


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