chapter hgroup + calming decor
This commit is contained in:
parent
0545b131de
commit
94d14d70c1
370 changed files with 9583 additions and 1566 deletions
|
|
@ -289,6 +289,23 @@ class A
|
|||
$keys = explode('.', $key);
|
||||
$firstKey = array_shift($keys);
|
||||
|
||||
// prefer a dotted prefix key if it exists
|
||||
// (e.g. plugin namespaces).
|
||||
for ($i = count($keys); $i > 0; $i--) {
|
||||
$prefix = $firstKey . '.' . implode('.', array_slice($keys, 0, $i));
|
||||
|
||||
if (
|
||||
isset($array[$prefix]) === true &&
|
||||
is_array($array[$prefix]) === true
|
||||
) {
|
||||
return static::get(
|
||||
$array[$prefix],
|
||||
implode('.', array_slice($keys, $i)),
|
||||
$default
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// if the input array also uses dot notation,
|
||||
// try to find a subset of the $keys
|
||||
if (isset($array[$firstKey]) === false) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue