MediaWiki  master
CommentParserFactory.php
Go to the documentation of this file.
1 <?php
2 
4 
5 use Language;
6 use LinkCache;
10 use NamespaceInfo;
11 use RepoGroup;
12 use TitleParser;
13 
19  private $linkRenderer;
23  private $linkCache;
25  private $repoGroup;
27  private $userLang;
29  private $contLang;
31  private $titleParser;
33  private $namespaceInfo;
35  private $hookContainer;
36 
48  public function __construct(
58  ) {
59  $this->linkRenderer = $linkRenderer;
60  $this->linkBatchFactory = $linkBatchFactory;
61  $this->linkCache = $linkCache;
62  $this->repoGroup = $repoGroup;
63  $this->userLang = $userLang;
64  $this->contLang = $contLang;
65  $this->titleParser = $titleParser;
66  $this->namespaceInfo = $namespaceInfo;
67  $this->hookContainer = $hookContainer;
68  }
69 
73  public function create() {
74  return new CommentParser(
75  $this->linkRenderer,
76  $this->linkBatchFactory,
77  $this->linkCache,
78  $this->repoGroup,
79  $this->userLang,
80  $this->contLang,
81  $this->titleParser,
82  $this->namespaceInfo,
83  $this->hookContainer
84  );
85  }
86 
87 }
MediaWiki\CommentFormatter\CommentParserFactory\$titleParser
TitleParser $titleParser
Definition: CommentParserFactory.php:31
LinkCache
Cache for article titles (prefixed DB keys) and ids linked from one source.
Definition: LinkCache.php:41
MediaWiki\CommentFormatter\CommentParserFactory\$userLang
Language $userLang
Definition: CommentParserFactory.php:27
MediaWiki\CommentFormatter\CommentParserFactory\$repoGroup
RepoGroup $repoGroup
Definition: CommentParserFactory.php:25
MediaWiki\Linker\LinkRenderer
Class that generates HTML anchor link elements for pages.
Definition: LinkRenderer.php:43
MediaWiki\CommentFormatter\CommentParserFactory\$linkRenderer
LinkRenderer $linkRenderer
Definition: CommentParserFactory.php:19
MediaWiki\CommentFormatter\CommentParserFactory\create
create()
Definition: CommentParserFactory.php:73
MediaWiki\CommentFormatter\CommentParserFactory\$contLang
Language $contLang
Definition: CommentParserFactory.php:29
MediaWiki\CommentFormatter\CommentParser
The text processing backend for CommentFormatter.
Definition: CommentParser.php:32
MediaWiki\CommentFormatter\CommentParserFactory\__construct
__construct(LinkRenderer $linkRenderer, LinkBatchFactory $linkBatchFactory, LinkCache $linkCache, RepoGroup $repoGroup, Language $userLang, Language $contLang, TitleParser $titleParser, NamespaceInfo $namespaceInfo, HookContainer $hookContainer)
Definition: CommentParserFactory.php:48
MediaWiki\Cache\LinkBatchFactory
Definition: LinkBatchFactory.php:39
TitleParser
A title parser service for MediaWiki.
Definition: TitleParser.php:33
MediaWiki\CommentFormatter\CommentParserFactory\$namespaceInfo
NamespaceInfo $namespaceInfo
Definition: CommentParserFactory.php:33
MediaWiki\CommentFormatter\CommentParserFactory\$linkBatchFactory
LinkBatchFactory $linkBatchFactory
Definition: CommentParserFactory.php:21
MediaWiki\CommentFormatter\CommentParserFactory
Definition: CommentParserFactory.php:17
MediaWiki\CommentFormatter\CommentParserFactory\$hookContainer
HookContainer $hookContainer
Definition: CommentParserFactory.php:35
MediaWiki\CommentFormatter
Definition: CommentBatch.php:3
RepoGroup
Prioritized list of file repositories.
Definition: RepoGroup.php:32
MediaWiki\CommentFormatter\CommentParserFactory\$linkCache
LinkCache $linkCache
Definition: CommentParserFactory.php:23
MediaWiki\HookContainer\HookContainer
HookContainer class.
Definition: HookContainer.php:45
NamespaceInfo
This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of them ba...
Definition: NamespaceInfo.php:35
Language
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more...
Definition: Language.php:42