Merge "maintenance: Document secondary purpose of --server"
[lhc/web/wiklou.git] / includes / tidy / TidyDriverBase.php
1 <?php
2
3 namespace MediaWiki\Tidy;
4
5 /**
6 * Base class for HTML cleanup utilities
7 */
8 abstract class TidyDriverBase {
9 protected $config;
10
11 function __construct( $config ) {
12 $this->config = $config;
13 }
14
15 /**
16 * Return true if validate() can be used
17 * @return bool
18 */
19 public function supportsValidate() {
20 return false;
21 }
22
23 /**
24 * Clean up HTML
25 *
26 * @param string $text HTML document fragment to clean up
27 * @return string The corrected HTML output
28 */
29 abstract public function tidy( $text );
30 }