Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 7 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
ParsoidServices | |
0.00% |
0 / 7 |
|
0.00% |
0 / 4 |
20 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getParsoidDataAccess | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getParsoidPageConfigFactory | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getParsoidSiteConfig | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | /** |
3 | * Copyright (C) 2011-2022 Wikimedia Foundation and others. |
4 | * |
5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. |
9 | * |
10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | * GNU General Public License for more details. |
14 | * |
15 | * You should have received a copy of the GNU General Public License along |
16 | * with this program; if not, write to the Free Software Foundation, Inc., |
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
18 | */ |
19 | declare( strict_types = 1 ); |
20 | |
21 | namespace MediaWiki\Parser\Parsoid; |
22 | |
23 | use MediaWiki\MediaWikiServices; |
24 | use MediaWiki\Parser\Parsoid\Config\PageConfigFactory; |
25 | use Wikimedia\Parsoid\Config\DataAccess; |
26 | use Wikimedia\Parsoid\Config\SiteConfig; |
27 | |
28 | /** |
29 | * @since 1.39 |
30 | * @deprecated since 1.39. This is a marker class indicating that certain |
31 | * code has been moved from Parsoid to core; it will be removed once the |
32 | * transition is complete. Use MediaWikiServices instead. |
33 | */ |
34 | class ParsoidServices { |
35 | private MediaWikiServices $services; |
36 | |
37 | /** |
38 | * @param MediaWikiServices $services |
39 | */ |
40 | public function __construct( MediaWikiServices $services ) { |
41 | $this->services = $services; |
42 | } |
43 | |
44 | /** |
45 | * @deprecated since 1.39. |
46 | * @return DataAccess |
47 | */ |
48 | public function getParsoidDataAccess(): DataAccess { |
49 | wfDeprecated( __METHOD__, '1.39' ); |
50 | return $this->services->getParsoidDataAccess(); |
51 | } |
52 | |
53 | /** |
54 | * @deprecated since 1.39. |
55 | * @return PageConfigFactory |
56 | */ |
57 | public function getParsoidPageConfigFactory(): PageConfigFactory { |
58 | wfDeprecated( __METHOD__, '1.39' ); |
59 | return $this->services->getParsoidPageConfigFactory(); |
60 | } |
61 | |
62 | /** |
63 | * @deprecated since 1.39. |
64 | * @return SiteConfig |
65 | */ |
66 | public function getParsoidSiteConfig(): SiteConfig { |
67 | wfDeprecated( __METHOD__, '1.39' ); |
68 | return $this->services->getParsoidSiteConfig(); |
69 | } |
70 | |
71 | } |