This class allows HTML to be transformed to a page content source format such as wikitext.
More...
|
| parseHTML (string $html, bool $validateXMLNames=false) |
|
|
StatsdDataFactoryInterface | $metrics = null |
|
This class allows HTML to be transformed to a page content source format such as wikitext.
- Since
- 1.40
- Stability: unstable
- should be stable before 1.40 release
Definition at line 40 of file HtmlToContentTransform.php.
◆ __construct()
- Parameters
-
string | $modifiedHTML | |
PageIdentity | $page | |
Parsoid | $parsoid | |
array | $parsoidSettings | |
PageConfigFactory | $pageConfigFactory | |
IContentHandlerFactory | $contentHandlerFactory | |
Definition at line 71 of file HtmlToContentTransform.php.
◆ getContentModel()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::getContentModel |
( |
| ) |
|
◆ getModifiedDocument()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::getModifiedDocument |
( |
| ) |
|
◆ getModifiedHtmlSize()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::getModifiedHtmlSize |
( |
| ) |
|
◆ getOffsetType()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::getOffsetType |
( |
| ) |
|
◆ getOriginalBody()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::getOriginalBody |
( |
| ) |
|
NOTE: The return value of this method depends on setOriginalData() having been called first.
- Returns
- Element
- Exceptions
-
Definition at line 390 of file HtmlToContentTransform.php.
◆ getOriginalHtml()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::getOriginalHtml |
( |
| ) |
|
Returns the original HTML, with any necessary processing applied.
- Todo
- Make this method redundant, nothing should operate on HTML strings.
- Returns
- string
Definition at line 348 of file HtmlToContentTransform.php.
◆ getOriginalRevisionId()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::getOriginalRevisionId |
( |
| ) |
|
◆ getOriginalSchemaVersion()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::getOriginalSchemaVersion |
( |
| ) |
|
◆ getSchemaVersion()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::getSchemaVersion |
( |
| ) |
|
NOTE: The return value of this method depends on setOriginalData() having been called first.
- Returns
- string
Definition at line 436 of file HtmlToContentTransform.php.
◆ hasOriginalDataParsoid()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::hasOriginalDataParsoid |
( |
| ) |
|
NOTE: The return value of this method depends on setOriginalData() having been called first.
- Returns
- bool
Definition at line 337 of file HtmlToContentTransform.php.
◆ hasOriginalHtml()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::hasOriginalHtml |
( |
| ) |
|
NOTE: The return value of this method depends on setOriginalData() having been called first.
- Returns
- bool
Definition at line 327 of file HtmlToContentTransform.php.
◆ htmlToContent()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::htmlToContent |
( |
| ) |
|
◆ knowsOriginalContent()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::knowsOriginalContent |
( |
| ) |
|
◆ parseHTML()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::parseHTML |
( |
string | $html, |
|
|
bool | $validateXMLNames = false ) |
|
protected |
◆ setContentLanguage()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::setContentLanguage |
( |
Bcp47Code | $lang | ) |
|
◆ setMetrics()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::setMetrics |
( |
StatsdDataFactoryInterface | $metrics | ) |
|
◆ setModifiedDataMW()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::setModifiedDataMW |
( |
array | $modifiedDataMW | ) |
|
◆ setOptions()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::setOptions |
( |
array | $options | ) |
|
◆ setOriginalContent()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::setOriginalContent |
( |
Content | $content | ) |
|
◆ setOriginalDataMW()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::setOriginalDataMW |
( |
array | $originalDataMW | ) |
|
◆ setOriginalDataParsoid()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::setOriginalDataParsoid |
( |
array | $originalDataParsoid | ) |
|
◆ setOriginalHtml()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::setOriginalHtml |
( |
string | $originalHtml | ) |
|
◆ setOriginalRevision()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::setOriginalRevision |
( |
RevisionRecord | $rev | ) |
|
◆ setOriginalRevisionId()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::setOriginalRevisionId |
( |
int | $oldid | ) |
|
◆ setOriginalSchemaVersion()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::setOriginalSchemaVersion |
( |
string | $originalSchemaVeraion | ) |
|
◆ setOriginalText()
MediaWiki\Parser\Parsoid\HtmlToContentTransform::setOriginalText |
( |
string | $text | ) |
|
◆ $metrics
StatsdDataFactoryInterface MediaWiki\Parser\Parsoid\HtmlToContentTransform::$metrics = null |
|
protected |
The documentation for this class was generated from the following file: