Page MenuHomeWickedGov Phorge

HookRunner.php
No OneTemporary

Size
988 B
Referenced Files
None
Subscribers
None

HookRunner.php

<?php
namespace MediaWiki\Extension\Math\Hooks;
use MediaWiki\Extension\Math\MathRenderer;
use MediaWiki\HookContainer\HookContainer;
use MediaWiki\Parser\Parser;
use stdClass;
/**
* This is a hook runner class, see docs/Hooks.md in core.
* @internal
*/
class HookRunner implements
MathFormulaPostRenderHook,
MathRenderingResultRetrievedHook
{
private HookContainer $hookContainer;
public function __construct( HookContainer $hookContainer ) {
$this->hookContainer = $hookContainer;
}
/**
* @inheritDoc
*/
public function onMathFormulaPostRender( Parser $parser, MathRenderer $renderer, string &$renderedMath ) {
return $this->hookContainer->run(
'MathFormulaPostRender',
[ $parser, $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
Wed, Aug 19, 11:41 (3 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
40/0b/ce2ed75bfa9e41e7ca34408086be
Default Alt Text
HookRunner.php (988 B)

Event Timeline