46 public static function tidy( $text ) {
50 ': tidy is disabled, caller should have checked MWTidy::isEnabled()' );
52 return $driver->tidy( $text );
69 if ( self::$instance ===
null ) {
82 $config[
'driver'] =
'RaggettInternalHHVM';
84 $config[
'driver'] =
'RaggettInternalPHP';
87 $config[
'driver'] =
'RaggettExternal';
90 wfDeprecated(
'$wgTidyConfig = null and $wgUseTidy = false',
'1.26' );
106 switch ( $config[
'driver'] ) {
107 case 'RaggettInternalHHVM':
110 case 'RaggettInternalPHP':
113 case 'RaggettExternal':
123 throw new MWException(
"Invalid tidy driver: \"{$config['driver']}\"" );
140 self::$instance =
null;
$wgTidyConf
The path to the tidy config file.
$wgTidyInternal
Set this to true to use the tidy extension.
$wgUseTidy
Set this to true to use the deprecated tidy configuration parameters.
$wgDebugTidy
Put tidy warnings in HTML comments Only works for internal tidy.
$wgTidyBin
The path to the tidy binary.
$wgTidyOpts
The command line options to the tidy binary.
$wgTidyConfig
Configuration for HTML postprocessing tool.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
wfIsHHVM()
Check if we are running under HHVM.
Class to interact with HTML tidy.
static factory(array $config)
Create a new Tidy driver object from configuration.
static setInstance( $instance)
Set the driver to be used.
static destroySingleton()
Destroy the current singleton instance.
static tidy( $text)
Interface with html tidy.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))