src/Converter.php
public static function describeDOMElement($other)
    {
        if ($other instanceof DOMElement) {
            $tag = $other->tagName;

            $id = $other->getAttribute("id");
            $id = $id ? '#'.$id : null;

            $classes = Converter::parseClasses($other->getAttribute("class"));
            $classes = $classes ? '.'.join('.', $classes) : null;

            return $tag.$id.$classes;
        } else {
            return '[unknown]';
        }
    }
public static function describeDOMElement($other)
    {
        if ($other instanceof DOMElement) {
            $tag = $other->tagName;

            $id = $other->getAttribute("id");
            $id = $id ? '#'.$id : null;

            $classes = Converter::parseClasses($other->getAttribute("class"));
            $classes = $classes ? '.'.join('.', $classes) : null;

            return $tag.$id.$classes;
        } else {
            return '[unknown]';
        }
    }
public static function describeDOMElement ( $ other ) { if ( $ other instanceof DOMElement ) { $ tag = $ other -> tagName ; $ id = $ other -> getAttribute ( "id" ) ; $ id = $ id ? '#' . $ id : null ; $ classes = Converter :: parseClasses ( $ other -> getAttribute ( "class" ) ) ; $ classes = $ classes ? '.' . join ( '.' , $ classes ) : null ; return $ tag . $ id . $ classes ; } else { return '[unknown]' ; } }
Convert a dom element to a textual representation.
Shows tag name, id and classes

@param  mixed $other
@return string
Convert a dom element to a textual representation . Shows tag name id and classes