/** * * */ public function getAvailableSettings($pa_element_info = null) { global $_ca_attribute_settings; $vs_service = isset($pa_element_info['service']) ? $pa_element_info['service'] : null; $va_names = InformationServiceManager::getInformationServiceNames(); if (!in_array($vs_service, $va_names)) { $vs_service = $va_names[0]; } if ($this->opo_plugin = InformationServiceManager::getInformationServiceInstance($vs_service)) { $va_settings = $this->opo_plugin->getAvailableSettings() + $_ca_attribute_settings['InformationServiceAttributeValue']; $va_settings['service']['options'] = InformationServiceManager::getInformationServiceNamesOptionList(); $va_service = $va_settings['service']; unset($va_settings['service']); $va_settings = array('service' => $va_service) + $va_settings; } else { $va_settings = array(); } return $va_settings; }
/** * * @param string $ps_format * @return BaseInformationService */ public static function getInformationServiceForFormat($ps_format) { InformationServiceManager::initInformationServices(); $va_services = InformationServiceManager::getInformationServiceNames(); foreach ($va_services as $vs_service) { if ($o_reader = InformationServiceManager::getInformationServiceInstance($vs_service)) { if ($o_reader->canReadFormat($ps_format)) { return $o_reader; } } } return null; }