Add App::keys() method
This commit is contained in:
parent
df4df3f746
commit
b679783fb8
1 changed files with 12 additions and 0 deletions
12
src/App.php
12
src/App.php
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue