Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
PreloadTransformParamsValue | |
0.00% |
0 / 6 |
|
0.00% |
0 / 4 |
20 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
getPage | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getParams | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getParserOptions | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | namespace MediaWiki\Content\Transform; |
3 | |
4 | use MediaWiki\Page\PageReference; |
5 | use ParserOptions; |
6 | |
7 | /** |
8 | * @internal |
9 | * An object to hold preload transform params. |
10 | */ |
11 | class PreloadTransformParamsValue implements PreloadTransformParams { |
12 | /** @var PageReference */ |
13 | private $page; |
14 | |
15 | /** @var array */ |
16 | private $params; |
17 | |
18 | /** @var ParserOptions */ |
19 | private $parserOptions; |
20 | |
21 | public function __construct( PageReference $page, ParserOptions $parserOptions, array $params = [] ) { |
22 | $this->page = $page; |
23 | $this->parserOptions = $parserOptions; |
24 | $this->params = $params; |
25 | } |
26 | |
27 | /** |
28 | * |
29 | * @return PageReference |
30 | */ |
31 | public function getPage(): PageReference { |
32 | return $this->page; |
33 | } |
34 | |
35 | /** |
36 | * |
37 | * @return array |
38 | */ |
39 | public function getParams(): array { |
40 | return $this->params; |
41 | } |
42 | |
43 | /** |
44 | * |
45 | * @return ParserOptions |
46 | */ |
47 | public function getParserOptions(): ParserOptions { |
48 | return $this->parserOptions; |
49 | } |
50 | } |