Html2Text\Html2Text::prevChildName PHP Method

prevChildName() static public method

static public prevChildName ( $node )
    static function prevChildName($node)
    {
        // get the previous child
        $nextNode = $node->previousSibling;
        while ($nextNode != null) {
            if ($nextNode instanceof \DOMElement) {
                break;
            }
            $nextNode = $nextNode->previousSibling;
        }
        $nextName = null;
        if ($nextNode instanceof \DOMElement && $nextNode != null) {
            $nextName = strtolower($nextNode->nodeName);
        }
        return $nextName;
    }