2 require_once(
'./Services/GlobalCache/classes/class.ilGlobalCache.php');
45 $this->
setActive($ilIniFile->
readVariable(self::INI_HEADER_CACHE, self::INI_FIELD_ACTIVATE_GLOBAL_CACHE));
46 $this->
setService($ilIniFile->
readVariable(self::INI_HEADER_CACHE, self::INI_FIELD_GLOBAL_CACHE_SERVICE_TYPE));
51 $cache_components = $ilIniFile->
readGroup(self::INI_HEADER_CACHE_ACTIVATED_COMPONENTS);
52 if (is_array($cache_components)) {
53 foreach ($cache_components as $comp => $v) {
67 $ilIniFile->
setVariable(self::INI_HEADER_CACHE, self::INI_FIELD_ACTIVATE_GLOBAL_CACHE, $this->
isActive() ?
'1' :
'0');
68 $ilIniFile->
setVariable(self::INI_HEADER_CACHE, self::INI_FIELD_GLOBAL_CACHE_SERVICE_TYPE, $this->
getService());
71 $ilIniFile->
removeGroup(self::INI_HEADER_CACHE_ACTIVATED_COMPONENTS);
72 $ilIniFile->
addGroup(self::INI_HEADER_CACHE_ACTIVATED_COMPONENTS);
76 if ($ilIniFile->
write()) {
93 $this->activated_components[] = $component;
94 $this->activated_components = array_unique($this->activated_components);
99 $this->activated_components =
array();
109 return in_array($component, $this->activated_components);
173 if (!$ilIniFile->
readGroup(self::INI_HEADER_CACHE)) {
174 $ilIniFile->
addGroup(self::INI_HEADER_CACHE);
176 if (!$ilIniFile->
readGroup(self::INI_HEADER_CACHE_ACTIVATED_COMPONENTS)) {
177 $ilIniFile->
addGroup(self::INI_HEADER_CACHE_ACTIVATED_COMPONENTS);
221 $r =
new ReflectionClass($this);
222 foreach (
$r->getConstants() as $k => $v) {
223 if (strpos($k,
'LOG_LEVEL') === 0 AND $v == $level) {
areAllComponentActivated()
checkIniHeader(ilIniFile $ilIniFile)
writeToIniFile(ilIniFile $ilIniFile)
setVariable($a_group_name, $a_var_name, $a_var_value)
sets a variable in a group public
write()
save ini-file-data to filesystem private
readVariable($a_group, $a_var_name)
reads a single variable from a group public
isComponentActivated($component)
Class ilGlobalCacheSettings.
readFromIniFile(ilIniFile $ilIniFile)
static lookupServiceClassName($service_type)
removeGroup($a_group_name)
removes a group public
static getAvailableComponents()
setActivatedComponents($activated_components)
resetActivatedComponents()
Create styles array
The data for the language used.
lookupLogLevelName($level)
addActivatedComponent($component)
static log($message, $log_level)
const INI_FIELD_ACTIVATE_GLOBAL_CACHE
const INI_FIELD_LOG_LEVEL
const INI_HEADER_CACHE_ACTIVATED_COMPONENTS
const INI_FIELD_GLOBAL_CACHE_SERVICE_TYPE
addGroup($a_group_name)
adds a new group public
readGroup($a_group_name)
returns an associative array of the variables in one group public