Accessing Configuration Keys in a Dynamic Way?
Content
Hello everyone,
I've numerous config variables set in the Agent Desktop which go like
CUSTOM_CFG_SCRIPT_ABC_33
CUSTOM_CFG_SCRIPT_DEF_26
CUSTOM_CFG_SCRIPT_GHI_51
.
.
.
and so on...
To fetch the values of these keys, I know I can use something like this:
$variable = RNCPHP\Configuration::fetch(CUSTOM_CFG_SCRIPT_DEF_26);
But is there a way in which I can use a wildcard (*) in it? Something like this?
$variable = RNCPHP\Configuration::fetch(CUSTOM_CFG_SCRIPT_*_26); // btw this doesn't workThe above doesn't work and throws error. Anyway to come around this problem?
Version
CP3
Tagged:
1