Ip\Internal\Text\Html2Text::prev_child_name PHP Method

prev_child_name() protected static method

protected static prev_child_name ( $node )
    protected static function prev_child_name($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 = mb_strtolower($nextNode->nodeName);
        }
        return $nextName;
    }