wiki.techinc.nl/includes/tidy/TidyDriverBase.php
Umherirrender 6eec17e9a9 Add missing documentation to class properties (miscellaneous classes)
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.

Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.

Change-Id: I1da4b272a6b28c419cc8e860d142dae19ca0bbcf
2024-09-14 10:12:18 +02:00

27 lines
708 B
PHP

<?php
namespace MediaWiki\Tidy;
/**
* Base class for HTML cleanup utilities
*/
abstract class TidyDriverBase {
/** @var array */
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 );
}