public static function initAllowedProperties() { $cacheKey = null; if (function_exists('apc_fetch') && function_exists('apc_store')) { $cacheKey = 'kHtmlPurifierAllowedProperties-' . kConf::getCachedVersionId(); self::$AllowedProperties = apc_fetch($cacheKey); } if (!self::$AllowedProperties) { self::$AllowedProperties = kConf::get("xss_allowed_object_properties"); // Convert values to keys (we don't care about the values) in order to test via array_key_exists. self::$AllowedProperties = array_flip(self::$AllowedProperties); if ($cacheKey) { apc_store($cacheKey, self::$AllowedProperties); } } }