Horde_Config::_getNodeOnlyText PHP Метод

_getNodeOnlyText() защищенный Метод

Returns the content of all text node children of the specified node.
protected _getNodeOnlyText ( DomNode $node ) : string
$node DomNode A DomNode object whose text node children to return.
Результат string The concatenated values of all text nodes.
    protected function _getNodeOnlyText($node)
    {
        $text = '';
        if (!$node->hasChildNodes()) {
            return $node->textContent;
        }
        foreach ($node->childNodes as $tnode) {
            if ($tnode->nodeType == XML_TEXT_NODE) {
                $text .= $tnode->textContent;
            }
        }
        return trim($text);
    }