/** * Getter for {@see $_backendConfiguration} * * @param String | optional $_key * @return mixed [If {@param $_key} is set then only the specified option is returned, otherwise the whole options hash] */ public static function getBackendConfiguration($_key = null, $_default = null) { //lazy loading for $_backendConfiguration if (!isset(self::$_backendConfiguration)) { if (Tinebase_Application::getInstance()->isInstalled('Tinebase')) { $rawBackendConfiguration = Tinebase_Config::getInstance()->get(Tinebase_Config::USERBACKEND, new Tinebase_Config_Struct())->toArray(); } else { $rawBackendConfiguration = array(); } self::$_backendConfiguration = is_array($rawBackendConfiguration) ? $rawBackendConfiguration : Zend_Json::decode($rawBackendConfiguration); } if (isset($_key)) { return isset(self::$_backendConfiguration[$_key]) || array_key_exists($_key, self::$_backendConfiguration) ? self::$_backendConfiguration[$_key] : $_default; } else { return self::$_backendConfiguration; } }