MediaWiki  1.28.0
MediaWiki\Tidy\TidyDriverBase Class Reference

Base class for HTML cleanup utilities. More...

Inheritance diagram for MediaWiki\Tidy\TidyDriverBase:

Public Member Functions

 __construct ($config)
 
 supportsValidate ()
 Return true if validate() can be used. More...
 
 tidy ($text)
 Clean up HTML. More...
 
 validate ($text, &$errorStr)
 Check HTML for errors, used if $wgValidateAllHtml = true. More...
 

Protected Attributes

 $config
 

Detailed Description

Base class for HTML cleanup utilities.

Definition at line 8 of file TidyDriverBase.php.

Constructor & Destructor Documentation

MediaWiki\Tidy\TidyDriverBase::__construct (   $config)

Definition at line 11 of file TidyDriverBase.php.

References MediaWiki\Tidy\TidyDriverBase\$config.

Member Function Documentation

MediaWiki\Tidy\TidyDriverBase::supportsValidate ( )

Return true if validate() can be used.

Definition at line 18 of file TidyDriverBase.php.

MediaWiki\Tidy\TidyDriverBase::tidy (   $text)
abstract

Clean up HTML.

Parameters
string$textHTML document fragment to clean up
Returns
string The corrected HTML output
MediaWiki\Tidy\TidyDriverBase::validate (   $text,
$errorStr 
)

Check HTML for errors, used if $wgValidateAllHtml = true.

Parameters
string$text
string&$errorStrReturn the error string
Returns
bool Whether the HTML is valid

Definition at line 29 of file TidyDriverBase.php.

Member Data Documentation

MediaWiki\Tidy\TidyDriverBase::$config
protected

Definition at line 9 of file TidyDriverBase.php.

Referenced by MediaWiki\Tidy\TidyDriverBase\__construct().


The documentation for this class was generated from the following file: