src/Collections/Collection.php
public static function get($array, $pattern)
    {
        if (!is_array($array)) {
            return;
        }
        //
        if (array_key_exists($pattern, $array)) {
            return $array[$pattern];
        }
        //
        foreach (explode('.', $pattern) as $segment) {
            if (is_array($array) && array_key_exists($segment, $array)) {
                $array = $array[$segment];
            } else {
                return;
            }
        }
        //
    }
public static function get($array, $pattern)
    {
        if (!is_array($array)) {
            return;
        }
        //
        if (array_key_exists($pattern, $array)) {
            return $array[$pattern];
        }
        //
        foreach (explode('.', $pattern) as $segment) {
            if (is_array($array) && array_key_exists($segment, $array)) {
                $array = $array[$segment];
            } else {
                return;
            }
        }
        //
    }
public static function get ( $ array , $ pattern ) { if ( ! is_array ( $ array ) ) { return ; } // if ( array_key_exists ( $ pattern , $ array ) ) { return $ array [ $ pattern ] ; } // foreach ( explode ( '.' , $ pattern ) as $ segment ) { if ( is_array ( $ array ) && array_key_exists ( $ segment , $ array ) ) { $ array = $ array [ $ segment ] ; } else { return ; } } // }
Get Element from array by dot aspect.

@param array  $array
@param string $pattern

@return mixed
Get Element from array by dot aspect .