MediaWiki
1.33.0
|
Class to interact with and configure Remex tidy. More...
Static Public Member Functions | |
static | destroySingleton () |
Destroy the current singleton instance. More... | |
static | factory (array $config=null) |
Create a new Tidy driver object from configuration. More... | |
static | isEnabled () |
static | setInstance ( $instance) |
Set the driver to be used. More... | |
static | singleton () |
static | tidy ( $text) |
Interface with Remex tidy. More... | |
Static Private Attributes | |
static | $instance |
Class to interact with and configure Remex tidy.
Definition at line 29 of file MWTidy.php.
|
static |
Destroy the current singleton instance.
Definition at line 93 of file MWTidy.php.
Referenced by TextContentTest\setUp(), and TextContentTest\tearDown().
Create a new Tidy driver object from configuration.
array | null | $config | Optional since 1.33 |
MWException |
Definition at line 76 of file MWTidy.php.
Referenced by BenchmarkTidy\execute(), and singleton().
|
static |
Definition at line 54 of file MWTidy.php.
References singleton().
Referenced by CompareParsers\checkOptions(), SpecialExpandTemplates\execute(), and TidyTest\setUp().
|
static |
Set the driver to be used.
This is for testing.
MediaWiki\\Tidy\\TidyDriverBase | false | null | $instance |
Definition at line 85 of file MWTidy.php.
References $instance, and wfDeprecated().
|
static |
Definition at line 61 of file MWTidy.php.
References $instance, $wgTidyConfig, and factory().
Referenced by BenchmarkTidy\execute(), isEnabled(), and tidy().
|
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.
string | $text | HTML input fragment. This should not contain a <body> or <html> tag. |
MWException |
Definition at line 42 of file MWTidy.php.
References singleton().
Referenced by SpecialExpandTemplates\execute(), and TidyTest\testTidyWrapping().
|
staticprivate |
Definition at line 30 of file MWTidy.php.
Referenced by setInstance(), and singleton().