public static function value(array $data, $key, $default = null)
    {
        $value = static::valueIfSet($data, $key, $default);

        if ($value) {
            return $value;
        } else {
            return $default;
        }
    }
public static function value(array $data, $key, $default = null)
    {
        $value = static::valueIfSet($data, $key, $default);

        if ($value) {
            return $value;
        } else {
            return $default;
        }
    }
public static function value ( array $ data , $ key , $ default = null ) { $ value = static :: valueIfSet ( $ data , $ key , $ default ) ; if ( $ value ) { return $ value ; } else { return $ default ; } }
Get an element from an array, or the default if it is not set or it's value is falsy.

@param array $data The array to get the element from
@param mixed $key The key within the array to get
@param mixed $default The default value to return if no element exists or it's value is falsy

@return mixed
Get an element from an array or the default if it is not set or it s value is falsy .