aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/plugins/config/core/Setting/SettingCompression.php
blob: f52405989c9eab24e3ae2539b5709d517dd5885d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

namespace dokuwiki\plugin\config\core\Setting;

/**
 * Class setting_compression
 */
class SettingCompression extends SettingMultichoice
{
    protected $choices = ['0'];      // 0 = no compression, always supported

    /** @inheritdoc */
    public function initialize($default = null, $local = null, $protected = null)
    {

        // populate _choices with the compression methods supported by this php installation
        if (function_exists('gzopen')) $this->choices[] = 'gz';
        if (function_exists('bzopen')) $this->choices[] = 'bz2';

        parent::initialize($default, $local, $protected);
    }
}