MediaWiki REL1_37
MediaWiki\Tidy\RemexDriver Class Reference
Inheritance diagram for MediaWiki\Tidy\RemexDriver:
Collaboration diagram for MediaWiki\Tidy\RemexDriver:

Public Member Functions

 __construct ( $options)
 
 tidy ( $text, ?callable $textProcessor=null)
 Clean up HTML.
Parameters
string$textHTML document fragment to clean up
?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.
Returns
string The corrected HTML output

 
- Public Member Functions inherited from MediaWiki\Tidy\TidyDriverBase
 supportsValidate ()
 Return true if validate() can be used.
 

Public Attributes

const CONSTRUCTOR_OPTIONS
 

Private Attributes

 $mungerTrace
 
 $pwrap
 
 $serializerTrace
 
 $treeMutationTrace
 

Additional Inherited Members

- Protected Attributes inherited from MediaWiki\Tidy\TidyDriverBase
 $config
 

Detailed Description

Definition at line 14 of file RemexDriver.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Tidy\RemexDriver::__construct (   $options)
Parameters
ServiceOptions | array$optionsPassing an array is deprecated.

Reimplemented from MediaWiki\Tidy\TidyDriverBase.

Definition at line 28 of file RemexDriver.php.

References MediaWiki\Tidy\TidyDriverBase\$config, true, and wfDeprecated().

Member Function Documentation

◆ tidy()

MediaWiki\Tidy\RemexDriver::tidy (   $text,
?callable  $textProcessor = null 
)

Clean up HTML.

Parameters
string$textHTML document fragment to clean up
?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.
Returns
string The corrected HTML output

Reimplemented from MediaWiki\Tidy\TidyDriverBase.

Definition at line 50 of file RemexDriver.php.

References wfDebug().

Member Data Documentation

◆ $mungerTrace

MediaWiki\Tidy\RemexDriver::$mungerTrace
private

Definition at line 17 of file RemexDriver.php.

◆ $pwrap

MediaWiki\Tidy\RemexDriver::$pwrap
private

Definition at line 18 of file RemexDriver.php.

◆ $serializerTrace

MediaWiki\Tidy\RemexDriver::$serializerTrace
private

Definition at line 16 of file RemexDriver.php.

◆ $treeMutationTrace

MediaWiki\Tidy\RemexDriver::$treeMutationTrace
private

Definition at line 15 of file RemexDriver.php.

◆ CONSTRUCTOR_OPTIONS

const MediaWiki\Tidy\RemexDriver::CONSTRUCTOR_OPTIONS
Initial value:
= [
'TidyConfig',
]
Access: internal

Definition at line 21 of file RemexDriver.php.


The documentation for this class was generated from the following file: