Extension:Scribunto/Hooks/ScribuntoExternalLibraries

ScribuntoExternalLibraries
Available from version ??? (Gerrit change 47548)
Allow extensions to add libraries
Define function:
public static function onScribuntoExternalLibraries( string $engine, array &$extraLibraries ) { ... }
Attach hook:
$wgHooks['ScribuntoExternalLibraries'][] = 'MyExtensionHooks::onScribuntoExternalLibraries';
Called from:File(s): Scribunto / includes/common/ScribuntoEngineBase.php
Function(s): getLibraries

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

Details

edit
  • $engine: A string representing which script engine to use (e.g 'lua')
  • &$extraLibraries: An array of strings (string[]) representing which libraries to load (keys are library names, values are names of PHP classes that implement the library)

See also

edit