Add App::keys() method

This commit is contained in:
Benjamin Renard 2023-03-01 11:23:48 +01:00
parent df4df3f746
commit b679783fb8
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC

View file

@ -150,6 +150,18 @@ class App {
);
}
/**
* Get list of keys of a specific option
*
* @param string $key The configuration variable key
*
* @return array An array of the keys of a specific option
**/
public static function keys($key) {
$value = self :: get($key);
return (is_array($value)?array_keys($value):array());
}
/**
* Set a specific option value
*