Refactoring Arr class.
This commit is contained in:
parent
8130f2da25
commit
ed52c19e05
|
@ -15,10 +15,7 @@ class Arr {
|
||||||
*/
|
*/
|
||||||
public static function get($array, $key, $default = null)
|
public static function get($array, $key, $default = null)
|
||||||
{
|
{
|
||||||
if (is_null($key))
|
if (is_null($key)) return $array;
|
||||||
{
|
|
||||||
return $array;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (explode('.', $key) as $segment)
|
foreach (explode('.', $key) as $segment)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue