public function __construct($file_name, $service_name = null, $load_plugins = true, $useDefualt = true) { KalturaServiceConfig::setStrictMode(false); if ($load_plugins) { $serviceConfigs = array(); $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaServices'); foreach ($pluginInstances as $pluginInstance) { $serviceConfigs[] = $pluginInstance->getServiceConfig(); } foreach ($serviceConfigs as $serviceConfig) { KalturaServiceConfig::addSecondaryConfigTables($serviceConfig); } } parent::myServiceConfig($file_name, $service_name, $useDefualt); }
public function getServiceConfig() { $service_config_id = $this->getServiceConfigId(); return myServiceConfig::getInstance($service_config_id); }
public function myServiceConfig($file_name, $service_name = null, $useDefualt = true) { $path = $this->getPath(); KalturaLog::debug("Path [{$path}] File [{$file_name}] Service [{$service_name}]"); $config_table_list = array(); if ($file_name == $this->getDefaultName()) { } else { if ($file_name) { $config_table_list[] = $path . $file_name; } } if (self::$secondary_config_tables) { // add the secondary before the end $config_table_list = array_merge($config_table_list, self::$secondary_config_tables); } // always append the defualt to the end if ($useDefualt) { $config_table_list[] = $path . $this->getDefaultName(); } // don't use the common path feature - add it to each config file separatly $this->config_chain = new kConfigTableChain($config_table_list, null); $tables = $this->config_chain->getTables(); self::$default_config_table = end($tables); $this->all_config_tables = $tables; if ($service_name) { $this->setServiceName($service_name); } }
function resetServiceConfig() { myServiceConfig::$secondary_config_tables = null; myServiceConfig::$path = null; myServiceConfig::$strict_mode = null; myServiceConfig::$default_config_table = null; }