From MediaWiki.org
Jump to navigation Jump to search
Available from version ??? (Gerrit change 47548)
Allow extensions to add libraries
Define function:
public static function onScribuntoExternalLibraries( $engine, &$extraLibraries ) { ... }
Attach hook:
$wgHooks['ScribuntoExternalLibraries'][] = 'MyExtensionHooks::onScribuntoExternalLibraries';
Called from:File(s): Scribunto / ScribuntoEngineBase.php
Function(s): setUp

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


  • string $engine — script engine to use (e.g 'lua')
  • string[] &$extraLibraries — libraries to load (keys are library names, values are names of PHP classes that implement the library)

See also[edit]