public static function addDoubleAttributes(Tag &$Tag)
    {
        if (isset(TagInfo::$doubleAttrs[$Tag->name])) {
            $missing = array();
            $found = '';
            foreach (TagInfo::$doubleAttrs[$Tag->name] as $k => $name) {
                if ($k === '%callback') {
                    $callback = $name;
                    continue;
                }
                if (isset($Tag->attributes[$name])) {
                    $found = $Tag->attributes[$name];
                } else {
                    $missing[] = $name;
                }
            }
            if (empty($found) || empty($missing)) {
                return;
            }
            foreach ($missing as $k) {
                $Tag->attributes[$k] = $found;
            }

            if (count($missing) && isset($callback) && is_callable($callback)) {
                call_user_func_array($callback, array(&$Tag, $missing));
            }
        }
    }
public static function addDoubleAttributes(Tag &$Tag)
    {
        if (isset(TagInfo::$doubleAttrs[$Tag->name])) {
            $missing = array();
            $found = '';
            foreach (TagInfo::$doubleAttrs[$Tag->name] as $k => $name) {
                if ($k === '%callback') {
                    $callback = $name;
                    continue;
                }
                if (isset($Tag->attributes[$name])) {
                    $found = $Tag->attributes[$name];
                } else {
                    $missing[] = $name;
                }
            }
            if (empty($found) || empty($missing)) {
                return;
            }
            foreach ($missing as $k) {
                $Tag->attributes[$k] = $found;
            }

            if (count($missing) && isset($callback) && is_callable($callback)) {
                call_user_func_array($callback, array(&$Tag, $missing));
            }
        }
    }
public static function addDoubleAttributes ( Tag & $ Tag ) { if ( isset ( TagInfo :: $ doubleAttrs [ $ Tag -> name ] ) ) { $ missing = array ( ) ; $ found = '' ; foreach ( TagInfo :: $ doubleAttrs [ $ Tag -> name ] as $ k => $ name ) { if ( $ k === '%callback' ) { $ callback = $ name ; continue ; } if ( isset ( $ Tag -> attributes [ $ name ] ) ) { $ found = $ Tag -> attributes [ $ name ] ; } else { $ missing [ ] = $ name ; } } if ( empty ( $ found ) || empty ( $ missing ) ) { return ; } foreach ( $ missing as $ k ) { $ Tag -> attributes [ $ k ] = $ found ; } if ( count ( $ missing ) && isset ( $ callback ) && is_callable ( $ callback ) ) { call_user_func_array ( $ callback , array ( & $ Tag , $ missing ) ) ; } } }
Duplicates some attributes if needed.

src & alt on image or name and id on inputs

@param Tag &$Tag the current Tag

@return void
Duplicates some attributes if needed .