Zend_Search_Lucene_Document_Html::_retrieveNodeText PHP Метод

_retrieveNodeText() приватный Метод

We should exclude scripts, which may be not included into comment tags, CDATA sections,
private _retrieveNodeText ( DOMNode $node, &$text )
$node DOMNode
    private function _retrieveNodeText(DOMNode $node, &$text)
    {
        if ($node->nodeType == XML_TEXT_NODE) {
            $text .= $node->nodeValue;
            if (!in_array($node->parentNode->tagName, $this->_inlineTags)) {
                $text .= ' ';
            }
        } elseif ($node->nodeType == XML_ELEMENT_NODE && $node->nodeName != 'script') {
            foreach ($node->childNodes as $childNode) {
                $this->_retrieveNodeText($childNode, $text);
            }
        }
    }