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 |
| A statistics aggregator. More...
|
|
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 38 of file HtmlToContentTransform.php.
◆ __construct()
Parser\Parsoid\HtmlToContentTransform::__construct |
( |
string |
$modifiedHTML, |
|
|
PageIdentity |
$page, |
|
|
Parsoid |
$parsoid, |
|
|
array |
$parsoidSettings, |
|
|
PageConfigFactory |
$pageConfigFactory, |
|
|
IContentHandlerFactory |
$contentHandlerFactory |
|
) |
| |
- Parameters
-
string | $modifiedHTML | |
PageIdentity | $page | |
Parsoid | $parsoid | |
array | $parsoidSettings | |
PageConfigFactory | $pageConfigFactory | |
IContentHandlerFactory | $contentHandlerFactory | |
Definition at line 102 of file HtmlToContentTransform.php.
◆ getContentModel()
Parser\Parsoid\HtmlToContentTransform::getContentModel |
( |
| ) |
|
◆ getModifiedDocument()
Parser\Parsoid\HtmlToContentTransform::getModifiedDocument |
( |
| ) |
|
◆ getModifiedHtmlSize()
Parser\Parsoid\HtmlToContentTransform::getModifiedHtmlSize |
( |
| ) |
|
◆ getOffsetType()
Parser\Parsoid\HtmlToContentTransform::getOffsetType |
( |
| ) |
|
◆ getOriginalBody()
Parser\Parsoid\HtmlToContentTransform::getOriginalBody |
( |
| ) |
|
NOTE: The return value of this method depends on setOriginalData() having been called first.
- Returns
- Element
- Exceptions
-
Definition at line 431 of file HtmlToContentTransform.php.
◆ getOriginalHtml()
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 389 of file HtmlToContentTransform.php.
◆ getOriginalRevisionId()
Parser\Parsoid\HtmlToContentTransform::getOriginalRevisionId |
( |
| ) |
|
◆ getOriginalSchemaVersion()
Parser\Parsoid\HtmlToContentTransform::getOriginalSchemaVersion |
( |
| ) |
|
◆ getSchemaVersion()
Parser\Parsoid\HtmlToContentTransform::getSchemaVersion |
( |
| ) |
|
NOTE: The return value of this method depends on setOriginalData() having been called first.
- Returns
- string
Definition at line 477 of file HtmlToContentTransform.php.
◆ hasOriginalDataParsoid()
Parser\Parsoid\HtmlToContentTransform::hasOriginalDataParsoid |
( |
| ) |
|
NOTE: The return value of this method depends on setOriginalData() having been called first.
- Returns
- bool
Definition at line 378 of file HtmlToContentTransform.php.
◆ hasOriginalHtml()
Parser\Parsoid\HtmlToContentTransform::hasOriginalHtml |
( |
| ) |
|
NOTE: The return value of this method depends on setOriginalData() having been called first.
- Returns
- bool
Definition at line 368 of file HtmlToContentTransform.php.
◆ htmlToContent()
Parser\Parsoid\HtmlToContentTransform::htmlToContent |
( |
| ) |
|
◆ knowsOriginalContent()
Parser\Parsoid\HtmlToContentTransform::knowsOriginalContent |
( |
| ) |
|
◆ parseHTML()
Parser\Parsoid\HtmlToContentTransform::parseHTML |
( |
string |
$html, |
|
|
bool |
$validateXMLNames = false |
|
) |
| |
|
protected |
◆ setContentLanguage()
Parser\Parsoid\HtmlToContentTransform::setContentLanguage |
( |
Bcp47Code |
$lang | ) |
|
◆ setMetrics()
Parser\Parsoid\HtmlToContentTransform::setMetrics |
( |
StatsdDataFactoryInterface |
$metrics | ) |
|
◆ setModifiedDataMW()
Parser\Parsoid\HtmlToContentTransform::setModifiedDataMW |
( |
array |
$modifiedDataMW | ) |
|
◆ setOptions()
Parser\Parsoid\HtmlToContentTransform::setOptions |
( |
array |
$options | ) |
|
◆ setOriginalContent()
Parser\Parsoid\HtmlToContentTransform::setOriginalContent |
( |
Content |
$content | ) |
|
◆ setOriginalDataMW()
Parser\Parsoid\HtmlToContentTransform::setOriginalDataMW |
( |
array |
$originalDataMW | ) |
|
◆ setOriginalDataParsoid()
Parser\Parsoid\HtmlToContentTransform::setOriginalDataParsoid |
( |
array |
$originalDataParsoid | ) |
|
◆ setOriginalHtml()
Parser\Parsoid\HtmlToContentTransform::setOriginalHtml |
( |
string |
$originalHtml | ) |
|
◆ setOriginalRevision()
Parser\Parsoid\HtmlToContentTransform::setOriginalRevision |
( |
RevisionRecord |
$rev | ) |
|
◆ setOriginalRevisionId()
Parser\Parsoid\HtmlToContentTransform::setOriginalRevisionId |
( |
int |
$oldid | ) |
|
◆ setOriginalSchemaVersion()
Parser\Parsoid\HtmlToContentTransform::setOriginalSchemaVersion |
( |
string |
$originalSchemaVeraion | ) |
|
◆ setOriginalText()
Parser\Parsoid\HtmlToContentTransform::setOriginalText |
( |
string |
$text | ) |
|
◆ $metrics
StatsdDataFactoryInterface Parser::Parsoid\HtmlToContentTransform::$metrics = null |
|
protected |
The documentation for this class was generated from the following file: