MediaWiki REL1_30
TidyDriverBase.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\Tidy;
4
8abstract class TidyDriverBase {
9 protected $config;
10
11 function __construct( $config ) {
12 $this->config = $config;
13 }
14
19 public function supportsValidate() {
20 return false;
21 }
22
31 public function validate( $text, &$errorStr ) {
32 throw new \MWException( static::class . ' does not support validate()' );
33 }
34
41 abstract public function tidy( $text );
42}
Base class for HTML cleanup utilities.
supportsValidate()
Return true if validate() can be used.
tidy( $text)
Clean up HTML.
validate( $text, &$errorStr)
Check HTML for errors, used if $wgValidateAllHtml = true.