| @@ 37-45 (lines=9) @@ | ||
| 34 | $keys = explode('.', $key); |
|
| 35 | $currentElement = $array; |
|
| 36 | ||
| 37 | foreach ($keys as $currentKey) |
|
| 38 | { |
|
| 39 | if (!is_array($currentElement) || !array_key_exists($currentKey, $currentElement)) |
|
| 40 | { |
|
| 41 | return false; |
|
| 42 | } |
|
| 43 | ||
| 44 | $currentElement = $currentElement[(string) $currentKey]; |
|
| 45 | } |
|
| 46 | ||
| 47 | return true; |
|
| 48 | } |
|
| @@ 70-78 (lines=9) @@ | ||
| 67 | $keys = explode('.', $key); |
|
| 68 | $currentElement = $array; |
|
| 69 | ||
| 70 | foreach ($keys as $currentKey) |
|
| 71 | { |
|
| 72 | if (!is_array($currentElement) || !array_key_exists($currentKey, $currentElement)) |
|
| 73 | { |
|
| 74 | return $default; |
|
| 75 | } |
|
| 76 | ||
| 77 | $currentElement = $currentElement[(string) $currentKey]; |
|
| 78 | } |
|
| 79 | ||
| 80 | return $currentElement; |
|
| 81 | } |
|