Converts HTML into a mobile-friendly version.
More...
|
| __construct ( $html, Title $title, Config $config, MobileContext $context) |
|
| applyTransforms (array $transforms) |
| Performs various transformations to the content to make it appropriate for mobile devices.
|
|
|
const | STYLE_COLLAPSIBLE_SECTION_CLASS = 'collapsible-block' |
| Class name for collapsible section wrappers.
|
|
|
| parseItemsToRemove () |
| @inheritDoc
|
|
Converts HTML into a mobile-friendly version.
◆ __construct()
MobileFormatter::__construct |
( |
|
$html, |
|
|
Title |
$title, |
|
|
Config |
$config, |
|
|
MobileContext |
$context |
|
) |
| |
- Parameters
-
string | $html | Text to process |
Title | $title | Title to which $html belongs |
Config | $config | |
MobileContext | $context | |
◆ applyTransforms()
MobileFormatter::applyTransforms |
( |
array |
$transforms | ) |
|
Performs various transformations to the content to make it appropriate for mobile devices.
- Parameters
-
array<IMobileTransform> | $transforms lit of transforms to be sequentually applied to html DOM |
◆ canApply()
static MobileFormatter::canApply |
( |
|
$text, |
|
|
|
$options |
|
) |
| |
|
static |
Check whether the MobileFormatter can be applied to the text of a page.
- Parameters
-
string | $text | |
array | $options | with 'maxHeadings' and 'maxImages' keys that limit the MobileFormatter to pages with less than or equal to that number of headings and images. |
- Returns
- bool
The documentation for this class was generated from the following file:
- includes/MobileFormatter.php