MediaWiki  master
CommentParserFactory.php
Go to the documentation of this file.
1 <?php
2 
4 
5 use Language;
6 use LinkCache;
12 use RepoGroup;
13 
19  private $linkRenderer;
21  private $linkBatchFactory;
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(
49  LinkRenderer $linkRenderer,
50  LinkBatchFactory $linkBatchFactory,
51  LinkCache $linkCache,
52  RepoGroup $repoGroup,
53  Language $userLang,
54  Language $contLang,
55  TitleParser $titleParser,
56  NamespaceInfo $namespaceInfo,
57  HookContainer $hookContainer
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 }
Base class for language-specific code.
Definition: Language.php:61
Cache for article titles (prefixed DB keys) and ids linked from one source.
Definition: LinkCache.php:45
__construct(LinkRenderer $linkRenderer, LinkBatchFactory $linkBatchFactory, LinkCache $linkCache, RepoGroup $repoGroup, Language $userLang, Language $contLang, TitleParser $titleParser, NamespaceInfo $namespaceInfo, HookContainer $hookContainer)
The text processing backend for CommentFormatter.
Class that generates HTML for internal links.
This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of them ba...
Prioritized list of file repositories.
Definition: RepoGroup.php:30
A title parser service for MediaWiki.
Definition: TitleParser.php:35