mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-24 00:05:00 +00:00
2ee5768ef5
Bug: T271026 Change-Id: If525e0f950b3a098162b19373edb3b443f559bf2
41 lines
892 B
PHP
41 lines
892 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\Scribunto\Hooks;
|
|
|
|
use MediaWiki\HookContainer\HookContainer;
|
|
|
|
/**
|
|
* This is a hook runner class, see docs/Hooks.md in core.
|
|
* @internal
|
|
*/
|
|
class HookRunner implements
|
|
ScribuntoExternalLibrariesHook,
|
|
ScribuntoExternalLibraryPathsHook
|
|
{
|
|
private HookContainer $hookContainer;
|
|
|
|
public function __construct( HookContainer $hookContainer ) {
|
|
$this->hookContainer = $hookContainer;
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function onScribuntoExternalLibraries( string $engine, array &$extraLibraries ) {
|
|
return $this->hookContainer->run(
|
|
'ScribuntoExternalLibraries',
|
|
[ $engine, &$extraLibraries ]
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function onScribuntoExternalLibraryPaths( string $engine, array &$extraLibraryPaths ) {
|
|
return $this->hookContainer->run(
|
|
'ScribuntoExternalLibraryPaths',
|
|
[ $engine, &$extraLibraryPaths ]
|
|
);
|
|
}
|
|
}
|