private function autoDetectType($value)
    {
        if (is_array($value)) {
            foreach ($value as $val) {
                if (!is_numeric($val)) {
                    return Type::STRING_SET;
                }
            }
            return Type::NUMBER_SET;
        } elseif (is_numeric($value)) {
            return Type::NUMBER;
        } else {
            return Type::STRING;
        }
    }
private function autoDetectType($value)
    {
        if (is_array($value)) {
            foreach ($value as $val) {
                if (!is_numeric($val)) {
                    return Type::STRING_SET;
                }
            }
            return Type::NUMBER_SET;
        } elseif (is_numeric($value)) {
            return Type::NUMBER;
        } else {
            return Type::STRING;
        }
    }
private function autoDetectType ( $ value ) { if ( is_array ( $ value ) ) { foreach ( $ value as $ val ) { if ( ! is_numeric ( $ val ) ) { return Type :: STRING_SET ; } } return Type :: NUMBER_SET ; } elseif ( is_numeric ( $ value ) ) { return Type :: NUMBER ; } else { return Type :: STRING ; } }
Auto detect attribute type base on value type
@todo Use the internal SDK method attribute()
@param mixed $value The attribute value
@return string The detected type
Auto detect attribute type base on value type