NAME
Kernel::Config – Provide access to the system configuration at runtime.
SYNOPSIS
my $ConfigObject = $Kernel::OM->Get('Kernel::Config');
my $Value = $ConfigObject->Get('My::Setting::Name');
$ConfigObject->Set(
Key => 'My::Setting::Name',
Value => 42, # new value; set to undef to remove the setting
);
DESCRIPTION
This object provides access to the system's configuration at runtime via the "Get()" and "Set()" methods.
BASE CLASSES
Inherits from Kernel::Config::Defaults.
PUBLIC INTERFACE
new()
Don't use the constructor directly, use the ObjectManager instead:
my $ConfigObject = $Kernel::OM->Get('Kernel::Config');
Get()
Retrieves the value of a config setting.
my $Value = $ConfigObject->Get('My::Setting::Name');
Returns the value of the setting.
Set()
Changes or deletes the value of a config setting.
$ConfigObject->Set(
Key => 'My::Setting::Name',
Value => 42, # new value; set to undef to remove the setting
);
ConfigChecksum()
This function returns an MD5 sum that is generated from all available config files (Kernel/Config.pm, Kernel/Config/Defaults.pm, Kernel/Config/Files/*.(pm|xml) except ZZZAAuto.pm) and their modification timestamps.
Whenever a file is changed, added or removed, this checksum will change.
This is used for example in the Loader to generate cache file names that change whenever the system configuration changes.