diff options
Diffstat (limited to 'www/wiki/includes/tidy/TidyDriverBase.php')
-rw-r--r-- | www/wiki/includes/tidy/TidyDriverBase.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/www/wiki/includes/tidy/TidyDriverBase.php b/www/wiki/includes/tidy/TidyDriverBase.php new file mode 100644 index 00000000..a53360c9 --- /dev/null +++ b/www/wiki/includes/tidy/TidyDriverBase.php @@ -0,0 +1,30 @@ +<?php + +namespace MediaWiki\Tidy; + +/** + * Base class for HTML cleanup utilities + */ +abstract class TidyDriverBase { + protected $config; + + function __construct( $config ) { + $this->config = $config; + } + + /** + * Return true if validate() can be used + * @return bool + */ + public function supportsValidate() { + return false; + } + + /** + * Clean up HTML + * + * @param string $text HTML document fragment to clean up + * @return string The corrected HTML output + */ + abstract public function tidy( $text ); +} |