protected static function prepareAttributes($attributes)
    {
        $prepared = array();
        if (is_string($attributes)) {
            return self::parseAttributes($attributes);

        } elseif (is_array($attributes)) {
            foreach ($attributes as $key => $value) {
                if (is_int($key)) {
                    $key = strtolower($value);
                    $prepared[$key] = $key;
                } else {
                    $prepared[strtolower($key)] = (string)$value;
                }
            }
        }
        return $prepared;
    }
protected static function prepareAttributes($attributes)
    {
        $prepared = array();
        if (is_string($attributes)) {
            return self::parseAttributes($attributes);

        } elseif (is_array($attributes)) {
            foreach ($attributes as $key => $value) {
                if (is_int($key)) {
                    $key = strtolower($value);
                    $prepared[$key] = $key;
                } else {
                    $prepared[strtolower($key)] = (string)$value;
                }
            }
        }
        return $prepared;
    }
protected static function prepareAttributes ( $ attributes ) { $ prepared = array ( ) ; if ( is_string ( $ attributes ) ) { return self :: parseAttributes ( $ attributes ) ; } elseif ( is_array ( $ attributes ) ) { foreach ( $ attributes as $ key => $ value ) { if ( is_int ( $ key ) ) { $ key = strtolower ( $ value ) ; $ prepared [ $ key ] = $ key ; } else { $ prepared [ strtolower ( $ key ) ] = ( string ) $ value ; } } } return $ prepared ; }
Creates a valid attribute array from either a string or an array

@param    mixed   Array of attributes or HTML attribute string
@return   array   An associative aray of attributes
Creates a valid attribute array from either a string or an array