/** * Reroutes calls to method implemented by settings delegate to the delegate class */ public function __call($ps_name, $pa_arguments) { if ($ps_name == 'setSetting' && $pa_arguments[0] == 'exporter_format') { // Load format-specific settings as it is selected if ($vs_format = $pa_arguments[1]) { $va_current_settings = $this->SETTINGS->getAvailableSettings(); if (is_array($va_format_settings = ca_data_exporters::getFormatSettings($vs_format))) { $va_current_settings += $va_format_settings; } $this->SETTINGS->setAvailableSettings($va_current_settings); } } if (method_exists($this->SETTINGS, $ps_name)) { return call_user_func_array(array($this->SETTINGS, $ps_name), $pa_arguments); } die($this->tableName() . " does not implement method {$ps_name}"); }