Extension:Scribunto/Hooks/ScribuntoExternalLibraries
Appearance
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
: Astring
representing which script engine to use (e.g'lua'
)&$extraLibraries
: Anarray
of strings (string[]
) representing which libraries to load (keys are library names, values are names of PHP classes that implement the library)