MediaWiki
master
|
Helper for getting output of a given wikitext page rendered by parsoid. More...
Public Member Functions | |
__construct (ParsoidOutputStash $parsoidOutputStash, IBufferingStatsdDataFactory $statsDataFactory, ParsoidOutputAccess $parsoidOutputAccess) | |
getETag (string $suffix='') | |
Returns an ETag uniquely identifying the HTML output. More... | |
getHtml () | |
getLastModified () | |
Returns the time at which the HTML was rendered. More... | |
getParamSettings () | |
init (PageRecord $page, array $parameters, User $user, ?RevisionRecord $revision=null) | |
Private Member Functions | |
getParserOutput () | |
Private Attributes | |
string | $flavor = null |
[ 'view', 'stash' ] are the supported flavors for now More... | |
PageRecord null | $page = null |
ParserOutput | $parserOutput |
ParsoidOutputAccess | $parsoidOutputAccess |
ParsoidOutputStash | $parsoidOutputStash |
RevisionRecord null | $revision = null |
bool | $stash = false |
IBufferingStatsdDataFactory | $stats |
User | $user |
Helper for getting output of a given wikitext page rendered by parsoid.
Definition at line 47 of file ParsoidHTMLHelper.php.
MediaWiki\Rest\Handler\ParsoidHTMLHelper::__construct | ( | ParsoidOutputStash | $parsoidOutputStash, |
IBufferingStatsdDataFactory | $statsDataFactory, | ||
ParsoidOutputAccess | $parsoidOutputAccess | ||
) |
ParsoidOutputStash | $parsoidOutputStash | |
IBufferingStatsdDataFactory | $statsDataFactory | |
ParsoidOutputAccess | $parsoidOutputAccess |
Definition at line 88 of file ParsoidHTMLHelper.php.
References MediaWiki\Rest\Handler\ParsoidHTMLHelper\$parsoidOutputAccess, and MediaWiki\Rest\Handler\ParsoidHTMLHelper\$parsoidOutputStash.
MediaWiki\Rest\Handler\ParsoidHTMLHelper::getETag | ( | string | $suffix = '' | ) |
Returns an ETag uniquely identifying the HTML output.
string | $suffix | A suffix to attach to the etag. |
Definition at line 162 of file ParsoidHTMLHelper.php.
MediaWiki\Rest\Handler\ParsoidHTMLHelper::getHtml | ( | ) |
LocalizedHttpException |
Definition at line 121 of file ParsoidHTMLHelper.php.
References MediaWiki\Rest\Handler\ParsoidHTMLHelper\$parserOutput, and Wikimedia\Message\MessageValue\new().
MediaWiki\Rest\Handler\ParsoidHTMLHelper::getLastModified | ( | ) |
Returns the time at which the HTML was rendered.
Definition at line 181 of file ParsoidHTMLHelper.php.
MediaWiki\Rest\Handler\ParsoidHTMLHelper::getParamSettings | ( | ) |
Definition at line 188 of file ParsoidHTMLHelper.php.
|
private |
Definition at line 202 of file ParsoidHTMLHelper.php.
References ParserOptions\newFromAnon().
MediaWiki\Rest\Handler\ParsoidHTMLHelper::init | ( | PageRecord | $page, |
array | $parameters, | ||
User | $user, | ||
?RevisionRecord | $revision = null |
||
) |
PageRecord | $page | |
array | $parameters | |
User | $user | |
RevisionRecord | null | $revision |
Definition at line 104 of file ParsoidHTMLHelper.php.
References MediaWiki\Rest\Handler\ParsoidHTMLHelper\$page, MediaWiki\Rest\Handler\ParsoidHTMLHelper\$revision, and MediaWiki\Rest\Handler\ParsoidHTMLHelper\$user.
|
private |
[ 'view', 'stash' ] are the supported flavors for now
Definition at line 66 of file ParsoidHTMLHelper.php.
|
private |
Definition at line 60 of file ParsoidHTMLHelper.php.
Referenced by MediaWiki\Rest\Handler\ParsoidHTMLHelper\init().
|
private |
Definition at line 81 of file ParsoidHTMLHelper.php.
Referenced by MediaWiki\Rest\Handler\ParsoidHTMLHelper\getHtml().
|
private |
Definition at line 78 of file ParsoidHTMLHelper.php.
Referenced by MediaWiki\Rest\Handler\ParsoidHTMLHelper\__construct().
|
private |
Definition at line 57 of file ParsoidHTMLHelper.php.
Referenced by MediaWiki\Rest\Handler\ParsoidHTMLHelper\__construct().
|
private |
Definition at line 63 of file ParsoidHTMLHelper.php.
Referenced by MediaWiki\Rest\Handler\ParsoidHTMLHelper\init().
|
private |
Definition at line 69 of file ParsoidHTMLHelper.php.
|
private |
Definition at line 72 of file ParsoidHTMLHelper.php.
|
private |
Definition at line 75 of file ParsoidHTMLHelper.php.
Referenced by MediaWiki\Rest\Handler\ParsoidHTMLHelper\init().