Jump to content

Manual:Hooks/wfShellWikiCmd

From mediawiki.org
wfShellWikiCmd
Available from version 1.20.0 (r97954, codereview)
Called when generating a shell-escaped command line string to run a cli script.
Define function:
public static function onwfShellWikiCmd( &$script, &$parameters, &$options ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"wfShellWikiCmd": "MediaWiki\\Extension\\MyExtension\\Hooks::onwfShellWikiCmd"
	}
}
Called from: File(s): GlobalFunctions.php
Interface: wfShellWikiCmdHook.php

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


Warning Warning: in 1.19 this hook was named wfShellMaintenanceCmd.

Details

[edit]
  • &$script: MediaWiki cli script path
  • &$parameters: Array of arguments and options to the script
  • &$options: Associative array of options, may contain the 'php' and 'wrapper' keys