MediaWiki master
|
Inherits MediaWiki\Rest\Handler\Helper\HtmlOutputHelper.
Public Member Functions | |||||||
__construct (?PageIdentity $page=null) | |||||||
getETag (string $suffix='') | |||||||
Returns an ETag uniquely identifying the HTML output.
| |||||||
getHtml () | |||||||
Fetch the HTML for rendering of a given page.If the rendering is available in parsoid parser cache, return that. Otherwise, perform a parse and return the result while caching it in the parser cache.NOTE: Caching can be explicitly disabled or a force parse action can be issued. Stashing and rate limiting on stashing also applies here if specified.
| |||||||
getLastModified () | |||||||
Returns the time at which the HTML was rendered.
| |||||||
init (PageIdentity $page) | |||||||
Initializes the helper with the given parameters like the page we're dealing with. | |||||||
putHeaders (ResponseInterface $response, bool $forHtml=true) | |||||||
Set the HTTP headers based on the response generated. | |||||||
setVariantConversionLanguage ( $targetLanguage, $sourceLanguage=null) | |||||||
Set the language to be used for variant conversion.If $targetLanguage is a string, it may be a list of language ranges as specified by RFC 9110 for use in the Accept-Language header. Implementations must be able to process this format, and may use the information provided to choose a supported target language that is desirable to the client.
| |||||||
Static Public Member Functions | |
static | getParamSettings () |
Gets the request parameters of this request.
| |
MediaWiki\Rest\Handler\Helper\HtmlMessageOutputHelper::__construct | ( | ?PageIdentity | $page = null | ) |
Definition at line 42 of file HtmlMessageOutputHelper.php.
References wfDeprecated().
MediaWiki\Rest\Handler\Helper\HtmlMessageOutputHelper::getETag | ( | string | $suffix = '' | ) |
Returns an ETag uniquely identifying the HTML output.
string | $suffix | A suffix to attach to the etag. Must consist of characters that are legal in ETags. |
Implements MediaWiki\Rest\Handler\Helper\HtmlOutputHelper.
Definition at line 92 of file HtmlMessageOutputHelper.php.
MediaWiki\Rest\Handler\Helper\HtmlMessageOutputHelper::getHtml | ( | ) |
Fetch the HTML for rendering of a given page.If the rendering is available in parsoid parser cache, return that. Otherwise, perform a parse and return the result while caching it in the parser cache.NOTE: Caching can be explicitly disabled or a force parse action can be issued. Stashing and rate limiting on stashing also applies here if specified.
LocalizedHttpException | |
ClientError |
Implements MediaWiki\Rest\Handler\Helper\HtmlOutputHelper.
Definition at line 73 of file HtmlMessageOutputHelper.php.
MediaWiki\Rest\Handler\Helper\HtmlMessageOutputHelper::getLastModified | ( | ) |
Returns the time at which the HTML was rendered.
Implements MediaWiki\Rest\Handler\Helper\HtmlOutputHelper.
Definition at line 107 of file HtmlMessageOutputHelper.php.
|
static |
Gets the request parameters of this request.
Implements MediaWiki\Rest\Handler\Helper\HtmlOutputHelper.
Definition at line 114 of file HtmlMessageOutputHelper.php.
MediaWiki\Rest\Handler\Helper\HtmlMessageOutputHelper::init | ( | PageIdentity | $page | ) |
Initializes the helper with the given parameters like the page we're dealing with.
PageIdentity | $page |
Definition at line 56 of file HtmlMessageOutputHelper.php.
MediaWiki\Rest\Handler\Helper\HtmlMessageOutputHelper::putHeaders | ( | ResponseInterface | $response, |
bool | $forHtml = true ) |
Set the HTTP headers based on the response generated.
ResponseInterface | $response | |
bool | $forHtml | Whether the response will be HTML (rather than JSON) |
Implements MediaWiki\Rest\Handler\Helper\HtmlOutputHelper.
Definition at line 128 of file HtmlMessageOutputHelper.php.
MediaWiki\Rest\Handler\Helper\HtmlMessageOutputHelper::setVariantConversionLanguage | ( | $targetLanguage, | |
$sourceLanguage = null ) |
Set the language to be used for variant conversion.If $targetLanguage is a string, it may be a list of language ranges as specified by RFC 9110 for use in the Accept-Language header. Implementations must be able to process this format, and may use the information provided to choose a supported target language that is desirable to the client.
Bcp47Code | string | $targetLanguage | |
Bcp47Code | string | null | $sourceLanguage |
Implements MediaWiki\Rest\Handler\Helper\HtmlOutputHelper.
Definition at line 121 of file HtmlMessageOutputHelper.php.