Horde_Kolab_Format_Xml_Helper::_fetchFirstTextNode PHP Method

_fetchFirstTextNode() private method

Fetch the the first text node.
private _fetchFirstTextNode ( DOMNode $node ) : DOMNode | null
$node DOMNode Retrieve the text value for this node.
return DOMNode | null The first text node or null if no such node was found.
    private function _fetchFirstTextNode($node)
    {
        foreach ($node->childNodes as $child) {
            if ($child->nodeType === XML_TEXT_NODE) {
                return $child;
            }
        }
    }