MediaWiki
master
HtmlOutputHelper.php
Go to the documentation of this file.
1
<?php
6
namespace
MediaWiki\Rest\Handler\Helper
;
7
8
use
MediaWiki\Parser\ParserOutput
;
9
use
MediaWiki\Rest\LocalizedHttpException
;
10
use
MediaWiki\Rest\ResponseInterface
;
11
use Wikimedia\Bcp47Code\Bcp47Code;
12
use Wikimedia\Parsoid\Core\ClientError;
13
use Wikimedia\Parsoid\Core\HtmlPageBundle;
14
19
interface
HtmlOutputHelper
{
20
34
public
function
getHtml
():
ParserOutput
;
35
48
public
function
getPageBundle
(): HtmlPageBundle;
49
60
public
function
getETag
(
string
$suffix =
''
): ?string;
61
69
public
function
getLastModified
(): ?string;
70
78
public
static
function
getParamSettings
(): array;
79
92
public
function
setVariantConversionLanguage
(
93
$targetLanguage,
94
$sourceLanguage =
null
95
): void;
96
105
public
function
putHeaders
(
ResponseInterface
$response,
bool
$forHtml =
true
): void;
106
107
}
MediaWiki\Parser\ParserOutput
ParserOutput is a rendering of a Content object or a message.
Definition
ParserOutput.php:91
MediaWiki\Rest\LocalizedHttpException
Definition
LocalizedHttpException.php:12
MediaWiki\Rest\Handler\Helper\HtmlOutputHelper
Definition
HtmlOutputHelper.php:19
MediaWiki\Rest\Handler\Helper\HtmlOutputHelper\getHtml
getHtml()
Fetch the HTML for rendering of a given page.
MediaWiki\Rest\Handler\Helper\HtmlOutputHelper\setVariantConversionLanguage
setVariantConversionLanguage( $targetLanguage, $sourceLanguage=null)
Set the language to be used for variant conversion.
MediaWiki\Rest\Handler\Helper\HtmlOutputHelper\getETag
getETag(string $suffix='')
Returns an ETag uniquely identifying the HTML output.
MediaWiki\Rest\Handler\Helper\HtmlOutputHelper\getLastModified
getLastModified()
Returns the time at which the HTML was rendered.
MediaWiki\Rest\Handler\Helper\HtmlOutputHelper\putHeaders
putHeaders(ResponseInterface $response, bool $forHtml=true)
Set the HTTP headers based on the response generated.
MediaWiki\Rest\Handler\Helper\HtmlOutputHelper\getParamSettings
static getParamSettings()
Gets the request parameters of this request.
MediaWiki\Rest\Handler\Helper\HtmlOutputHelper\getPageBundle
getPageBundle()
Fetch the rendering of a given page as a full-document HtmlPageBundle.
MediaWiki\Rest\ResponseInterface
An interface similar to PSR-7's ResponseInterface, the primary difference being that it is mutable.
Definition
ResponseInterface.php:41
MediaWiki\Rest\Handler\Helper
Copyright (C) 2011-2020 Wikimedia Foundation and others.
Definition
HtmlInputTransformHelper.php:6
includes
Rest
Handler
Helper
HtmlOutputHelper.php
Generated on Thu Oct 8 2026 23:23:39 for MediaWiki by
1.10.0