1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
# --
# Copyright (C) 2001-2021 OTRS AG, https://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
# --
=head1 NAME
Kernel::Config - Provide access to the system configuration at runtime.
=head1 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
);
=head1 DESCRIPTION
This object provides access to the system's configuration at runtime via
the L</Get()> and L</Set()> methods.
=head1 BASE CLASSES
Inherits from L<Kernel::Config::Defaults>.
=head1 PUBLIC INTERFACE
=head2 new()
Don't use the constructor directly, use the ObjectManager instead:
my $ConfigObject = $Kernel::OM->Get('Kernel::Config');
=head2 Get()
Retrieves the value of a config setting.
my $Value = $ConfigObject->Get('My::Setting::Name');
Returns the value of the setting.
=head2 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
);
=head2 ConfigChecksum()
This function returns an MD5 sum that is generated from all available
config files (F<Kernel/Config.pm>, F<Kernel/Config/Defaults.pm>, F<Kernel/Config/Files/*.(pm|xml)>
except F<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.
=head1 TERMS AND CONDITIONS
This software is part of the OTRS project (https://otrs.org/).
This software comes with ABSOLUTELY NO WARRANTY. For details, see
the enclosed file COPYING for license information (GPL). If you
did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
=cut
|