1<?php 2 3namespace dokuwiki\plugin\config\core\Setting; 4 5/** 6 * Class setting_compression 7 */ 8class SettingCompression extends SettingMultichoice 9{ 10 11 protected $choices = ['0']; // 0 = no compression, always supported 12 13 /** @inheritdoc */ 14 public function initialize($default = null, $local = null, $protected = null) 15 { 16 17 // populate _choices with the compression methods supported by this php installation 18 if(function_exists('gzopen')) $this->choices[] = 'gz'; 19 if(function_exists('bzopen')) $this->choices[] = 'bz2'; 20 21 parent::initialize($default, $local, $protected); 22 } 23} 24