Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
Hooks | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
onParserFirstCallInit | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\Chart; |
4 | |
5 | use MediaWiki\Hook\ParserFirstCallInitHook; |
6 | use MediaWiki\Parser\Parser; |
7 | |
8 | class Hooks implements ParserFirstCallInitHook { |
9 | /** @var ParserFunction */ |
10 | private $mParserFunction; |
11 | |
12 | public function __construct() { |
13 | $this->mParserFunction = new ParserFunction(); |
14 | } |
15 | |
16 | /** |
17 | * @param Parser $parser |
18 | */ |
19 | public function onParserFirstCallInit( $parser ) { |
20 | $parser->setFunctionHook( 'chart', [ $this->mParserFunction, 'render' ] ); |
21 | } |
22 | } |