| 1 |
<?php |
| 2 |
|
| 3 |
namespace MediaWiki\Extension\CodeEditor\Hooks; |
| 4 |
|
| 5 |
use MediaWiki\HookContainer\HookContainer; |
| 6 |
use MediaWiki\Title\Title; |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
class HookRunner implements |
| 13 |
CodeEditorGetPageLanguageHook |
| 14 |
{ |
| 15 |
private HookContainer $hookContainer; |
| 16 |
|
| 17 |
public function __construct( HookContainer $hookContainer ) { |
| 18 |
$this->hookContainer = $hookContainer; |
| 19 |
} |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
public function onCodeEditorGetPageLanguage( Title $title, ?string &$lang, string $model, string $format ) { |
| 25 |
return $this->hookContainer->run( |
| 26 |
'CodeEditorGetPageLanguage', |
| 27 |
[ $title, &$lang, $model, $format ] |
| 28 |
); |
| 29 |
} |
| 30 |
} |