Class to interact with and configure Remex tidy.
More...
|
static | destroySingleton () |
| Destroy the current singleton instance.
|
|
static | factory (array $config=null) |
| Create a new Tidy driver object from configuration.
|
|
static | isEnabled () |
|
static | setInstance ( $instance) |
| Set the driver to be used.
|
|
static | singleton () |
|
static | tidy ( $text) |
| Interface with Remex tidy.
|
|
Class to interact with and configure Remex tidy.
Definition at line 29 of file MWTidy.php.
◆ destroySingleton()
static MWTidy::destroySingleton |
( |
| ) |
|
|
static |
Destroy the current singleton instance.
Definition at line 93 of file MWTidy.php.
◆ factory()
static MWTidy::factory |
( |
array | $config = null | ) |
|
|
static |
Create a new Tidy driver object from configuration.
- See also
- $wgTidyConfig
- Parameters
-
array | null | $config | Optional since 1.33 |
- Returns
- bool|\MediaWiki\Tidy\TidyDriverBase
- Exceptions
-
Definition at line 76 of file MWTidy.php.
◆ isEnabled()
static MWTidy::isEnabled |
( |
| ) |
|
|
static |
◆ setInstance()
static MWTidy::setInstance |
( |
| $instance | ) |
|
|
static |
◆ singleton()
static MWTidy::singleton |
( |
| ) |
|
|
static |
◆ tidy()
static MWTidy::tidy |
( |
| $text | ) |
|
|
static |
Interface with Remex tidy.
If tidy isn't able to correct the markup, the original will be returned in all its glory with a warning comment appended.
- Parameters
-
string | $text | HTML input fragment. This should not contain a <body> or <html> tag. |
- Returns
- string Corrected HTML output
- Exceptions
-
Definition at line 42 of file MWTidy.php.
◆ $instance
The documentation for this class was generated from the following file: