wiki.techinc.nl/includes/tidy/TidyDriverBase.php
Matěj Suchánek 5b34ec2c1f Remove deprecated code from tidy drivers
Change-Id: I88f35425955ed5b189e0741268aa361582d0f1db
2022-11-28 18:05:34 +01:00

26 lines
689 B
PHP

<?php
namespace MediaWiki\Tidy;
/**
* Base class for HTML cleanup utilities
*/
abstract class TidyDriverBase {
protected $config;
public function __construct( $config ) {
$this->config = $config;
}
/**
* Clean up HTML
*
* @param string $text HTML document fragment to clean up
* @param ?callable $textProcessor A callback to run on the contents of
* text nodes (not elements or attribute values). This can be used to
* apply text modifications like french spacing or smart quotes, without
* affecting element or attribute markup.
* @return string The corrected HTML output
*/
abstract public function tidy( $text, ?callable $textProcessor = null );
}