Page MenuHomeWickedGov Phorge

HookRunner.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

HookRunner.php

<?php
namespace MediaWiki\Extension\Math\Hooks;
use MediaWiki\Extension\Math\MathRenderer;
use MediaWiki\HookContainer\HookContainer;
use MediaWiki\Revision\RevisionRecord;
use stdClass;
/**
* This is a hook runner class, see docs/Hooks.md in core.
* @internal
*/
class HookRunner implements
MathFormulaPostRenderRevisionHook,
MathRenderingResultRetrievedHook
{
private HookContainer $hookContainer;
public function __construct( HookContainer $hookContainer ) {
$this->hookContainer = $hookContainer;
}
/**
* @inheritDoc
*/
public function onMathFormulaPostRenderRevision(
?RevisionRecord $revisionRecord,
MathRenderer $renderer,
string &$renderedMath
) {
return $this->hookContainer->run(
'MathFormulaPostRenderRevision',
[ $revisionRecord, $renderer, &$renderedMath ]
);
}
/**
* @inheritDoc
*/
public function onMathRenderingResultRetrieved( MathRenderer &$renderer, stdClass &$jsonResult ) {
return $this->hookContainer->run(
'MathRenderingResultRetrieved',
[ &$renderer, &$jsonResult ]
);
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, Nov 23, 11:43 (5 d, 9 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
5d/26/c6ad0275c241de267b4cd9c3905e
Default Alt Text
HookRunner.php (1 KB)

Event Timeline