_debug = $debug; } } public function setOption($name, $value) { if (property_exists($this, "_{$name}")) { $this->{"_{$name}"} = $value; } return $this; } public function getOption($name) { if (property_exists($this, "_{$name}")) { return $this->{"_{$name}"}; } } public function getOptions() { $options = []; $optionsToAdd = [ 'url', 'themes', 'theme', 'cssAutoLoad', 'contextmenu', 'customData', 'lang', 'requestType', 'width', 'height', 'commands', 'disabled', 'commandsOptions', 'rememberLastDir', 'reloadClearHistory', 'defaultView', 'ui', 'sortOrder', 'sortStickFolders', 'dragUploadAllow', 'fileModeStyle', 'resizable', ]; foreach ($optionsToAdd as $option) { if (isset($this->{"_{$option}"})) { $options[$option] = $this->getOption($option); } } return $options; } }