|
MediaWiki master
|
REST helper for converting HTML to page content source (e.g. More...
Public Member Functions | |
| __construct (StatsFactory $statsFactory, HtmlTransformFactory $htmlTransformFactory, ParsoidOutputStash $parsoidOutputStash, ParserOutputAccess $parserOutputAccess, PageLookup $pageLookup, RevisionLookup $revisionLookup, array $envOptions=[], ?PageIdentity $page=null, $body='', array $parameters=[], ?RevisionRecord $originalRevision=null, ?Bcp47Code $pageLanguage=null) | |
| getContent () | |
| getParamSettings () | |
| getTransform () | |
| Return HTMLTransform object, so additional context can be provided by calling setters on it. | |
| init (PageIdentity $page, $body, array $parameters, ?RevisionRecord $originalRevision=null, ?Bcp47Code $pageLanguage=null) | |
| putContent (ResponseInterface $response) | |
| Creates a response containing the content derived from the input HTML. | |
| setMetrics (StatsFactory $statsFactory) | |
| Set metrics sink. | |
| setOriginal ( $rev, $originalRendering) | |
| Supply information about the revision and rendering that was the original basis of the input HTML. | |
Public Attributes | |
| const | CONSTRUCTOR_OPTIONS |
REST helper for converting HTML to page content source (e.g.
wikitext).
Definition at line 49 of file HtmlInputTransformHelper.php.
| MediaWiki\Rest\Handler\Helper\HtmlInputTransformHelper::__construct | ( | StatsFactory | $statsFactory, |
| HtmlTransformFactory | $htmlTransformFactory, | ||
| ParsoidOutputStash | $parsoidOutputStash, | ||
| ParserOutputAccess | $parserOutputAccess, | ||
| PageLookup | $pageLookup, | ||
| RevisionLookup | $revisionLookup, | ||
| array | $envOptions = [], | ||
| ?PageIdentity | $page = null, | ||
| $body = '', | |||
| array | $parameters = [], | ||
| ?RevisionRecord | $originalRevision = null, | ||
| ?Bcp47Code | $pageLanguage = null ) |
| StatsFactory | $statsFactory | |
| HtmlTransformFactory | $htmlTransformFactory | |
| ParsoidOutputStash | $parsoidOutputStash | |
| ParserOutputAccess | $parserOutputAccess | |
| PageLookup | $pageLookup | |
| RevisionLookup | $revisionLookup | |
| array | $envOptions | |
| ?PageIdentity | $page | |
| array | string | $body | Body structure, or an HTML string |
| array | $parameters | |
| RevisionRecord | null | $originalRevision | |
| Bcp47Code | null | $pageLanguage |
Definition at line 91 of file HtmlInputTransformHelper.php.
References wfDeprecated().
| MediaWiki\Rest\Handler\Helper\HtmlInputTransformHelper::getContent | ( | ) |
| HttpException |
Definition at line 584 of file HtmlInputTransformHelper.php.
| MediaWiki\Rest\Handler\Helper\HtmlInputTransformHelper::getParamSettings | ( | ) |
Definition at line 122 of file HtmlInputTransformHelper.php.
| MediaWiki\Rest\Handler\Helper\HtmlInputTransformHelper::getTransform | ( | ) |
Return HTMLTransform object, so additional context can be provided by calling setters on it.
Definition at line 429 of file HtmlInputTransformHelper.php.
| MediaWiki\Rest\Handler\Helper\HtmlInputTransformHelper::init | ( | PageIdentity | $page, |
| $body, | |||
| array | $parameters, | ||
| ?RevisionRecord | $originalRevision = null, | ||
| ?Bcp47Code | $pageLanguage = null ) |
| PageIdentity | $page | |
| array | string | $body | Body structure, or an HTML string |
| array | $parameters | |
| RevisionRecord | null | $originalRevision | |
| Bcp47Code | null | $pageLanguage |
| HttpException |
Definition at line 293 of file HtmlInputTransformHelper.php.
References wfDeprecated().
| MediaWiki\Rest\Handler\Helper\HtmlInputTransformHelper::putContent | ( | ResponseInterface | $response | ) |
Creates a response containing the content derived from the input HTML.
This will set the appropriate Content-Type header.
Definition at line 611 of file HtmlInputTransformHelper.php.
References MediaWiki\Rest\ResponseInterface\getBody(), and MediaWiki\Rest\ResponseInterface\setHeader().
| MediaWiki\Rest\Handler\Helper\HtmlInputTransformHelper::setMetrics | ( | StatsFactory | $statsFactory | ) |
Set metrics sink.
Definition at line 436 of file HtmlInputTransformHelper.php.
| MediaWiki\Rest\Handler\Helper\HtmlInputTransformHelper::setOriginal | ( | $rev, | |
| $originalRendering ) |
Supply information about the revision and rendering that was the original basis of the input HTML.
This is used to apply selective serialization (selser), if possible.
| RevisionRecord | int | null | $rev | |
| ParsoidRenderID | HtmlPageBundle | ParserOutput | null | $originalRendering |
Definition at line 451 of file HtmlInputTransformHelper.php.
| const MediaWiki\Rest\Handler\Helper\HtmlInputTransformHelper::CONSTRUCTOR_OPTIONS |
Definition at line 53 of file HtmlInputTransformHelper.php.