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