Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 4
CRAP
0.00% covered (danger)
0.00%
0 / 1
ParsoidServices
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 4
20
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getParsoidDataAccess
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 getParsoidPageConfigFactory
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 getParsoidSiteConfig
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
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 */
19declare( strict_types = 1 );
20
21namespace MediaWiki\Parser\Parsoid;
22
23use MediaWiki\MediaWikiServices;
24use MediaWiki\Parser\Parsoid\Config\PageConfigFactory;
25use Wikimedia\Parsoid\Config\DataAccess;
26use 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 */
34class 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     * @return DataAccess
46     */
47    public function getParsoidDataAccess(): DataAccess {
48        wfDeprecated( __METHOD__, '1.39' );
49        return $this->services->getParsoidDataAccess();
50    }
51
52    /**
53     * @return PageConfigFactory
54     */
55    public function getParsoidPageConfigFactory(): PageConfigFactory {
56        wfDeprecated( __METHOD__, '1.39' );
57        return $this->services->getParsoidPageConfigFactory();
58    }
59
60    /**
61     * @return SiteConfig
62     */
63    public function getParsoidSiteConfig(): SiteConfig {
64        wfDeprecated( __METHOD__, '1.39' );
65        return $this->services->getParsoidSiteConfig();
66    }
67
68}