public static function fromArray(array $value)
    {
        $language = null;
        $culture = null;

        if (!empty($value['language'])) {
            $language = $value['language'];
        } elseif ($value[0]) {
            $language = $value[0];
        }

        if (!empty($value['culture'])) {
            $culture = $value['culture'];
        } elseif ($value[1]) {
            $culture = $value[1];
        }

        return new static($language, $culture);
    }
public static function fromArray(array $value)
    {
        $language = null;
        $culture = null;

        if (!empty($value['language'])) {
            $language = $value['language'];
        } elseif ($value[0]) {
            $language = $value[0];
        }

        if (!empty($value['culture'])) {
            $culture = $value['culture'];
        } elseif ($value[1]) {
            $culture = $value[1];
        }

        return new static($language, $culture);
    }
public static function fromArray ( array $ value ) { $ language = null ; $ culture = null ; if ( ! empty ( $ value [ 'language' ] ) ) { $ language = $ value [ 'language' ] ; } elseif ( $ value [ 0 ] ) { $ language = $ value [ 0 ] ; } if ( ! empty ( $ value [ 'culture' ] ) ) { $ culture = $ value [ 'culture' ] ; } elseif ( $ value [ 1 ] ) { $ culture = $ value [ 1 ] ; } return new static ( $ language , $ culture ) ; }
Parses the given array and returns its Locale representation.

@param array $value The value to parse.
@return Locale The Locale representation of the given value or a null value.
Parses the given array and returns its Locale representation .