Manual:Hooks/MediaWikiPerformAction

Details
Use this to do something completely different, after the basic globals have been set up, but before ordinary actions take place. Note: the MediaWiki class is not passed by this hook; however to replace the MediaWiki::performActions method, you need to be able to access it. This can be done by inserting: as the first line in the hook and returning a value of "false" after execution of the hook is complete. $mediaWiki is a currently undocumented global class variable.
 * $output: $wgOut
 * $article: $wgArticle
 * $title:  $wgTitle
 * $user:   $wgUser
 * $request: $wgRequest