Available from version 1.10.0
called before displaying a page with action=raw. Returns true if display is allowed, false if display is not allowed.
Define function:
public static function onRawPageViewBeforeOutput( &$rawAction, &$text ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"RawPageViewBeforeOutput": "MyExtensionHooks::onRawPageViewBeforeOutput"

For MediaWiki ≤1.25:

$wgHooks['RawPageViewBeforeOutput'][] = 'MyExtensionHooks::onRawPageViewBeforeOutput';
Called from:File(s): actions/RawAction.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:RawPageViewBeforeOutput extensions.