static function readAnalyzerSettingsFromINI() { $analyzerData = eZImageAnalyzer::analyzerData(); $ini = eZINI::instance('image.ini'); foreach ($analyzerData['analyzers'] as $analyzerName) { $iniGroup = $analyzerName . 'Analyzer'; if ($ini->hasGroup($iniGroup)) { $handler = $ini->variable($iniGroup, 'Handler'); $mimeList = $ini->variable($iniGroup, 'MIMEList'); $analyzerData['analyzer'][$analyzerName] = array('handler' => $handler, 'mime_list' => $mimeList); foreach ($mimeList as $mimeItem) { $analyzerData['analyzer_map'][$mimeItem] = $analyzerName; } } else { eZDebug::writeWarning("INI group {$iniGroup} does not exist in image.ini", __METHOD__); } } $GLOBALS['eZImageAnalyzer'] = $analyzerData; }
/** * Returns a shared instance of the eZImageManager class and makes it ready for use. * As in calls {@link self::readINISettings()} and {@link eZImageAnalyzer::readAnalyzerSettingsFromINI()} * * @since 4.3 * @return eZImageManager */ static function factory() { if ( self::$factory === false ) { self::$factory = true; self::instance()->readINISettings(); eZImageAnalyzer::readAnalyzerSettingsFromINI(); } return self::instance(); }
/** * Returns a shared instance of the eZImageManager class and makes it ready for use. * As in calls {@link self::readINISettings()} and {@link eZImageAnalyzer::readAnalyzerSettingsFromINI()} * * @since 4.3 * @return eZImageManager */ static function factoryForAllSiteAccesses() { if (self::$factory === false) { self::$factory = true; self::instance()->readINISettings('bcimagealias.ini'); eZImageAnalyzer::readAnalyzerSettingsFromINI(); } return self::instance(); }