MediaWiki
1.33.0
|
The RevisionRenderer service provides access to rendered output for revisions. More...
Public Member Functions | |
__construct (ILoadBalancer $loadBalancer, SlotRoleRegistry $roleRegistry, $wikiId=false) | |
getRenderedRevision (RevisionRecord $rev, ParserOptions $options=null, User $forUser=null, array $hints=[]) | |
setLogger (LoggerInterface $saveParseLogger) | |
Private Member Functions | |
combineSlotOutput (RenderedRevision $rrev, array $hints=[]) | |
This implements the layout for combining the output of multiple slots. More... | |
getSpeculativeRevId ( $dbIndex) | |
Private Attributes | |
ILoadBalancer | $loadBalancer |
SlotRoleRegistry | $roleRegistery |
LoggerInterface | $saveParseLogger |
string bool | $wikiId |
The RevisionRenderer service provides access to rendered output for revisions.
It does so be acting as a factory for RenderedRevision instances, which in turn provide lazy access to ParserOutput objects.
One key responsibility of RevisionRenderer is implementing the layout used to combine the output of multiple slots.
Definition at line 45 of file RevisionRenderer.php.
Revision\RevisionRenderer::__construct | ( | ILoadBalancer | $loadBalancer, |
SlotRoleRegistry | $roleRegistry, | ||
$wikiId = false |
|||
) |
ILoadBalancer | $loadBalancer | |
SlotRoleRegistry | $roleRegistry | |
bool | string | $wikiId |
Definition at line 64 of file RevisionRenderer.php.
References Revision\RevisionRenderer\$loadBalancer, and Revision\RevisionRenderer\$wikiId.
|
private |
This implements the layout for combining the output of multiple slots.
RenderedRevision | $rrev | |
array | $hints | see RenderedRevision::getRevisionParserOutput() |
Definition at line 185 of file RevisionRenderer.php.
References $html, $options, $out, as, Revision\RenderedRevision\getOptions(), Revision\RenderedRevision\getRevision(), Revision\RenderedRevision\getSlotParserOutput(), and Revision\SlotRecord\MAIN.
Referenced by Revision\RevisionRenderer\getRenderedRevision().
Revision\RevisionRenderer::getRenderedRevision | ( | RevisionRecord | $rev, |
ParserOptions | $options = null , |
||
User | $forUser = null , |
||
array | $hints = [] |
||
) |
RevisionRecord | $rev | |
ParserOptions | null | $options | |
User | null | $forUser | User for privileged access. Default is unprivileged (public) access, unless the 'audience' hint is set to something else RevisionRecord::RAW. |
array | $hints | Hints given as an associative array. Known keys:
|
Definition at line 102 of file RevisionRenderer.php.
References $options, $rev, $title, Revision\RevisionRenderer\$wikiId, array(), Revision\RevisionRenderer\combineSlotOutput(), DB_MASTER, DB_REPLICA, Revision\RevisionRecord\DELETED_TEXT, Revision\RevisionRecord\FOR_PUBLIC, Revision\RevisionRecord\FOR_THIS_USER, Revision\RevisionRenderer\getSpeculativeRevId(), ParserOptions\newCanonical(), Title\newFromLinkTarget(), Revision\RenderedRevision\setSaveParseLogger(), and use.
|
private |
Definition at line 157 of file RevisionRenderer.php.
References DB_REPLICA.
Referenced by Revision\RevisionRenderer\getRenderedRevision().
Revision\RevisionRenderer::setLogger | ( | LoggerInterface | $saveParseLogger | ) |
LoggerInterface | $saveParseLogger |
Definition at line 79 of file RevisionRenderer.php.
References Revision\RevisionRenderer\$saveParseLogger.
|
private |
Definition at line 51 of file RevisionRenderer.php.
Referenced by Revision\RevisionRenderer\__construct().
|
private |
Definition at line 54 of file RevisionRenderer.php.
|
private |
Definition at line 48 of file RevisionRenderer.php.
Referenced by Revision\RevisionRenderer\setLogger().
|
private |
Definition at line 57 of file RevisionRenderer.php.
Referenced by Revision\RevisionRenderer\__construct(), and Revision\RevisionRenderer\getRenderedRevision().