Merge "mediawiki.content.json: Remove file and author annotations"
[mediawiki.git] / includes / parser / Parsoid / ParsoidServices.php
blob626146a0de0641ba5ebb3de6992807e849031257
1 <?php
2 /**
3 * Copyright (C) 2011-2022 Wikimedia Foundation and others.
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.
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.
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.
19 declare( strict_types = 1 );
21 namespace MediaWiki\Parser\Parsoid;
23 use MediaWiki\MediaWikiServices;
24 use MediaWiki\Parser\Parsoid\Config\PageConfigFactory;
25 use Wikimedia\Parsoid\Config\DataAccess;
26 use Wikimedia\Parsoid\Config\SiteConfig;
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.
34 class ParsoidServices {
35 private MediaWikiServices $services;
37 public function __construct( MediaWikiServices $services ) {
38 $this->services = $services;
41 /**
42 * @deprecated since 1.39.
43 * @return DataAccess
45 public function getParsoidDataAccess(): DataAccess {
46 wfDeprecated( __METHOD__, '1.39' );
47 return $this->services->getParsoidDataAccess();
50 /**
51 * @deprecated since 1.39.
52 * @return PageConfigFactory
54 public function getParsoidPageConfigFactory(): PageConfigFactory {
55 wfDeprecated( __METHOD__, '1.39' );
56 return $this->services->getParsoidPageConfigFactory();
59 /**
60 * @deprecated since 1.39.
61 * @return SiteConfig
63 public function getParsoidSiteConfig(): SiteConfig {
64 wfDeprecated( __METHOD__, '1.39' );
65 return $this->services->getParsoidSiteConfig();