38 $this->enabled =
true;
39 if ( $useConfiguration ) {
45 'debugComment' =>
false,
50 $this->config[
'driver'] =
wfIsHHVM() ?
'RaggettInternalHHVM' :
'RaggettInternalPHP';
52 $this->config[
'driver'] =
'RaggettExternal';
55 $this->enabled =
false;
59 'tidyConfigFile' =>
"$IP/includes/tidy/tidy.conf",
60 'tidyCommandLine' =>
'',
62 if ( extension_loaded(
'tidy' ) && (
wfIsHHVM() || class_exists(
'tidy' ) ) ) {
63 $this->config[
'driver'] =
wfIsHHVM() ?
'RaggettInternalHHVM' :
'RaggettInternalPHP';
66 $this->config[
'driver'] =
'RaggettExternal';
70 if ( $path !==
false ) {
71 $this->config[
'driver'] =
'RaggettExternal';
74 $this->enabled =
false;
79 if ( !$this->enabled ) {
80 $this->config = [
'driver' =>
'disabled' ];
$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.
$wgTidyBin
The path to the tidy binary.
$wgTidyOpts
The command line options to the tidy binary.
$wgTidyConfig
Configuration for HTML postprocessing tool.
wfIsHHVM()
Check if we are running under HHVM.
static locateExecutableInDefaultPaths( $names, $versionInfo=false)
Same as locateExecutable(), but checks in getPossibleBinPaths() by default.
Initialize and detect the tidy support.
isEnabled()
Returns true if tidy is usable.
__construct( $useConfiguration=false)
Determine if there is a usable tidy.