MediaWiki  1.29.1
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


Detailed Description

Base class for HTML cleanup utilities.

Definition at line 8 of file TidyDriverBase.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 11 of file TidyDriverBase.php.

References MediaWiki\Tidy\TidyDriverBase\$config.

Member Function Documentation

◆ supportsValidate()

MediaWiki\Tidy\TidyDriverBase::supportsValidate ( )

Return true if validate() can be used.

Reimplemented in MediaWiki\Tidy\RaggettExternal, and MediaWiki\Tidy\RaggettInternalPHP.

Definition at line 18 of file TidyDriverBase.php.

◆ tidy()

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

Clean up HTML.

string$textHTML document fragment to clean up
string The corrected HTML output

Reimplemented in MediaWiki\Tidy\RemexDriver, MediaWiki\Tidy\Html5Depurate, MediaWiki\Tidy\Html5Internal, and MediaWiki\Tidy\RaggettBase.

◆ validate()

MediaWiki\Tidy\TidyDriverBase::validate (   $text,

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

string&$errorStrReturn the error string
bool Whether the HTML is valid

Reimplemented in MediaWiki\Tidy\RaggettBase.

Definition at line 29 of file TidyDriverBase.php.

References class.

Member Data Documentation

◆ $config

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