MediaWiki REL1_39
|
The text processing backend for CommentFormatter. More...
Public Member Functions | |
__construct (LinkRenderer $linkRenderer, LinkBatchFactory $linkBatchFactory, LinkCache $linkCache, RepoGroup $repoGroup, Language $userLang, Language $contLang, TitleParser $titleParser, NamespaceInfo $namespaceInfo, HookContainer $hookContainer) | |
finalize ( $comments) | |
Execute pending batch queries and replace markers in the specified string(s) with actual links. | |
preprocess (string $comment, LinkTarget $selfLinkTarget=null, $samePage=false, $wikiId=false, $enableSectionLinks=true) | |
Convert a comment to HTML, but replace links with markers which are resolved later. | |
preprocessUnsafe ( $comment, LinkTarget $selfLinkTarget=null, $samePage=false, $wikiId=false, $enableSectionLinks=true) | |
Convert a comment in pseudo-HTML format to HTML, replacing links with markers. | |
The text processing backend for CommentFormatter.
CommentParser objects should be discarded after the comment batch is complete, in order to reduce memory usage.
Definition at line 32 of file CommentParser.php.
MediaWiki\CommentFormatter\CommentParser::__construct | ( | LinkRenderer | $linkRenderer, |
LinkBatchFactory | $linkBatchFactory, | ||
LinkCache | $linkCache, | ||
RepoGroup | $repoGroup, | ||
Language | $userLang, | ||
Language | $contLang, | ||
TitleParser | $titleParser, | ||
NamespaceInfo | $namespaceInfo, | ||
HookContainer | $hookContainer ) |
LinkRenderer | $linkRenderer | |
LinkBatchFactory | $linkBatchFactory | |
LinkCache | $linkCache | |
RepoGroup | $repoGroup | |
Language | $userLang | |
Language | $contLang | |
TitleParser | $titleParser | |
NamespaceInfo | $namespaceInfo | |
HookContainer | $hookContainer |
Definition at line 78 of file CommentParser.php.
MediaWiki\CommentFormatter\CommentParser::finalize | ( | $comments | ) |
Execute pending batch queries and replace markers in the specified string(s) with actual links.
string | string[] | $comments |
Definition at line 142 of file CommentParser.php.
MediaWiki\CommentFormatter\CommentParser::preprocess | ( | string | $comment, |
LinkTarget | $selfLinkTarget = null, | ||
$samePage = false, | |||
$wikiId = false, | |||
$enableSectionLinks = true ) |
Convert a comment to HTML, but replace links with markers which are resolved later.
string | $comment | |
LinkTarget | null | $selfLinkTarget | |
bool | $samePage | |
string | false | null | $wikiId | |
bool | $enableSectionLinks |
Definition at line 111 of file CommentParser.php.
MediaWiki\CommentFormatter\CommentParser::preprocessUnsafe | ( | $comment, | |
LinkTarget | $selfLinkTarget = null, | ||
$samePage = false, | |||
$wikiId = false, | |||
$enableSectionLinks = true ) |
Convert a comment in pseudo-HTML format to HTML, replacing links with markers.
string | $comment | |
LinkTarget | null | $selfLinkTarget | |
bool | $samePage | |
string | false | null | $wikiId | |
bool | $enableSectionLinks |
Definition at line 128 of file CommentParser.php.