MediaWiki REL1_38
|
The RevisionRenderer service provides access to rendered output for revisions. More...
Public Member Functions | |
__construct (ILoadBalancer $loadBalancer, SlotRoleRegistry $roleRegistry, ContentRenderer $contentRenderer, $dbDomain=false) | |
getRenderedRevision (RevisionRecord $rev, ParserOptions $options=null, Authority $forPerformer=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. | |
getSpeculativePageId ( $dbIndex) | |
getSpeculativeRevId ( $dbIndex) | |
Private Attributes | |
ContentRenderer | $contentRenderer |
string bool | $dbDomain |
ILoadBalancer | $loadBalancer |
SlotRoleRegistry | $roleRegistery |
LoggerInterface | $saveParseLogger |
The RevisionRenderer service provides access to rendered output for revisions.
It does so by 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.
MediaWiki\Revision\RevisionRenderer::__construct | ( | ILoadBalancer | $loadBalancer, |
SlotRoleRegistry | $roleRegistry, | ||
ContentRenderer | $contentRenderer, | ||
$dbDomain = false |
|||
) |
ILoadBalancer | $loadBalancer | |
SlotRoleRegistry | $roleRegistry | |
ContentRenderer | $contentRenderer | |
bool | string | $dbDomain | DB domain of the relevant wiki or false for the current one |
Definition at line 68 of file RevisionRenderer.php.
References MediaWiki\Revision\RevisionRenderer\$contentRenderer, MediaWiki\Revision\RevisionRenderer\$dbDomain, and MediaWiki\Revision\RevisionRenderer\$loadBalancer.
|
private |
This implements the layout for combining the output of multiple slots.
RenderedRevision | $rrev | |
array | $hints | see RenderedRevision::getRevisionParserOutput() |
Definition at line 213 of file RevisionRenderer.php.
References MediaWiki\Revision\RenderedRevision\getOptions(), MediaWiki\Revision\RenderedRevision\getRevision(), MediaWiki\Revision\RenderedRevision\getSlotParserOutput(), and MediaWiki\Revision\SlotRecord\MAIN.
Referenced by MediaWiki\Revision\RevisionRenderer\getRenderedRevision().
MediaWiki\Revision\RevisionRenderer::getRenderedRevision | ( | RevisionRecord | $rev, |
ParserOptions | $options = null , |
||
Authority | $forPerformer = null , |
||
array | $hints = [] |
||
) |
RevisionRecord | $rev | |
ParserOptions | null | $options | |
Authority | null | $forPerformer | 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 108 of file RevisionRenderer.php.
References MediaWiki\Revision\RevisionRecord\audienceCan(), MediaWiki\Revision\RevisionRenderer\combineSlotOutput(), DB_PRIMARY, DB_REPLICA, MediaWiki\Revision\RevisionRecord\DELETED_TEXT, MediaWiki\Revision\RevisionRecord\FOR_PUBLIC, MediaWiki\Revision\RevisionRecord\FOR_THIS_USER, MediaWiki\Revision\RevisionRecord\getId(), MediaWiki\Revision\RevisionRenderer\getSpeculativePageId(), MediaWiki\Revision\RevisionRenderer\getSpeculativeRevId(), MediaWiki\Revision\RevisionRecord\getTimestamp(), MediaWiki\Revision\RevisionRecord\getWikiId(), and MediaWiki\Revision\RenderedRevision\setSaveParseLogger().
Referenced by RefreshLinksJob\getParserOutput().
|
private |
Definition at line 188 of file RevisionRenderer.php.
Referenced by MediaWiki\Revision\RevisionRenderer\getRenderedRevision().
|
private |
Definition at line 173 of file RevisionRenderer.php.
Referenced by MediaWiki\Revision\RevisionRenderer\getRenderedRevision().
MediaWiki\Revision\RevisionRenderer::setLogger | ( | LoggerInterface | $saveParseLogger | ) |
LoggerInterface | $saveParseLogger |
Definition at line 84 of file RevisionRenderer.php.
References MediaWiki\Revision\RevisionRenderer\$saveParseLogger.
|
private |
Definition at line 57 of file RevisionRenderer.php.
Referenced by MediaWiki\Revision\RevisionRenderer\__construct().
|
private |
Definition at line 60 of file RevisionRenderer.php.
Referenced by MediaWiki\Revision\RevisionRenderer\__construct().
|
private |
Definition at line 51 of file RevisionRenderer.php.
Referenced by MediaWiki\Revision\RevisionRenderer\__construct().
|
private |
Definition at line 54 of file RevisionRenderer.php.
|
private |
Definition at line 48 of file RevisionRenderer.php.
Referenced by MediaWiki\Revision\RevisionRenderer\setLogger().