< Extension:Scribunto < Hooks
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

  • $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

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.